Only the latest release gets fixes.
| Version | Supported |
|---|---|
| 2.1.x | yes |
| < 2.1 | no |
Report privately through GitHub's private vulnerability reporting: https://github.com/SoDaHo/env-loader/security/advisories/new
Do not open a public issue. Include the affected version, the PHP version and SAPI (CLI, PHP-FPM, CGI),
variables_order and, if possible, a minimal reproduction.
Outside the reach of the library (README, section Security):
- The path is trusted input: without
localOnly: true, a URL is opened with its stream wrapper if that wrapper stats it as a regular file. - With an
Einvariables_order, PHP-FPM and CGI fill$_ENVwith the request, and$_ENVwins over the file.rejectRequestVariables: trueguards the listed names only. requiredchecks presence, a string value and, withrequireNonEmpty, emptiness; not the strength of a secret.format()output is not escaped for a shell.- The backtrace PHP prints for a fatal error can show the start of a line of the file.
- Long-running workers share
$_ENVbetween requests. A replaced plain file wrapper that suspends fibers is not supported.