Security checks: PHP
Security checks: PHP
Section titled “Security checks: PHP”php.ini values as the web server’s PHP sees them. The command line reads them through a signed, loopback-only route, because the CLI often loads a different php.ini from PHP-FPM.
From V8.5.0, these checks run in php artisan rconfig:security-check and on Security Review. Run only this group with:
cd /var/www/html/rconfig8php artisan rconfig:security-check --only=phpEach failing check shows the exact fix for your server, including paths, on the page and in the command output. The sections below explain what each check looks for.
| Check | Severity | Checks that |
|---|---|---|
php.version_min |
Critical | PHP meets rConfig’s security minimum |
php.version_eol |
High | The PHP branch still gets security fixes |
php.display_errors |
High | PHP errors are logged, not shown |
php.exception_args |
Medium | Stack traces leave out argument values |
php.expose |
Low | PHP does not announce its version |
php.url_include |
High | PHP cannot include code from URLs |
php.session |
Low | Native PHP sessions are hardened |
php.upload_progress |
Low | Session upload progress is off |
php.assertions |
Low | Assertions are compiled out |
php.cgi_fix_pathinfo |
Low | PHP-FPM does not guess script paths |
php.fpm_pool |
High | PHP-FPM pools do not run as root and only run .php files |
php.disable_functions |
Info | disable_functions does not break rConfig |
PHP meets rConfig’s security minimum
Section titled “PHP meets rConfig’s security minimum”Check ID: php.version_min · Severity: Critical
rConfig’s PHP minimum tracks PHP security releases. Older PHP builds carry known, remotely exploitable flaws (rCFG-SA-2026-01, rCFG-SA-2026-16).
Guards against: rCFG-SA-2026-01, rCFG-SA-2026-16
References: NIST SI-2, NIS2 21(2)(e), CIS Controls 7.3
The PHP branch still gets security fixes
Section titled “The PHP branch still gets security fixes”Check ID: php.version_eol · Severity: High
Once a PHP branch reaches end of life, new vulnerabilities in it are never fixed.
References: NIST SI-2, NIST SA-22, NIS2 21(2)(e)
PHP errors are logged, not shown
Section titled “PHP errors are logged, not shown”Check ID: php.display_errors · Severity: High
Errors printed to the page reveal file paths, queries and values to whoever triggered them. They belong in the log only.
References: NIST SI-11, CIS (PHP hardening), OWASP ASVS V7.4
Stack traces leave out argument values
Section titled “Stack traces leave out argument values”Check ID: php.exception_args · Severity: Medium
With zend.exception_ignore_args off, stack traces in logs include every function argument, which can be a password or decrypted credential (SEC-INT-002).
References: NIST AU-9, NIST SI-11, SEC-INT-002
PHP does not announce its version
Section titled “PHP does not announce its version”Check ID: php.expose · Severity: Low
expose_php adds an X-Powered-By header with the exact PHP version to every response.
References: NIST CM-7, CIS (PHP hardening)
PHP cannot include code from URLs
Section titled “PHP cannot include code from URLs”Check ID: php.url_include · Severity: High
allow_url_include turns any file-inclusion bug into remote code execution. rConfig never needs it.
References: NIST CM-7, OWASP ASVS V12.3
Native PHP sessions are hardened
Section titled “Native PHP sessions are hardened”Check ID: php.session · Severity: Low
rConfig uses Laravel sessions, but PHP’s own session settings still apply to anything else on the server, and the CIS PHP guidance asks for strict mode and cookie-only sessions.
References: NIST SC-23, OWASP ASVS V3.2
Session upload progress is off
Section titled “Session upload progress is off”Check ID: php.upload_progress · Severity: Low
session.upload_progress writes attacker-controlled data into the session store. Turning it off was part of the published mitigation for rCFG-SA-2026-01 (PHP2Shell). rConfig does not use it.
Guards against: rCFG-SA-2026-01
References: NIST CM-7, rCFG-SA-2026-01
Assertions are compiled out
Section titled “Assertions are compiled out”Check ID: php.assertions · Severity: Low
zend.assertions = -1 is the production setting: assertion code is never compiled, so it cannot leak detail or slow requests.
References: NIST CM-6
PHP-FPM does not guess script paths
Section titled “PHP-FPM does not guess script paths”Check ID: php.cgi_fix_pathinfo · Severity: Low
With cgi.fix_pathinfo on, a request for an uploaded image followed by /x.php can run the image as PHP on some server setups.
References: NIST CM-7, CIS (PHP-FPM hardening)
PHP-FPM pools do not run as root and only run .php files
Section titled “PHP-FPM pools do not run as root and only run .php files”Check ID: php.fpm_pool · Severity: High
A pool running as root turns any PHP bug into full control of the server. security.limit_extensions stops other file types being run as PHP.
References: NIST AC-6, CIS (PHP-FPM hardening)
disable_functions does not break rConfig
Section titled “disable_functions does not break rConfig”Check ID: php.disable_functions · Severity: Info
Generic PHP hardening guides disable process functions that rConfig needs for device connections. Disable other functions if you like, but not these.
References: NIST CM-7
See Hardening guides for the configuration snippets behind these checks, and NIS2 Article 21 mapping for the controls they give evidence for.