Vulnerability · Published Sep 9, 2025 · Assigned by GitHub_M
CVE-2025-58759TinyEnv: Inline comments not stripped properly in .env values
Medium 5.1
In plain English
A medium-severity improper input validation in tiny-env from datahihi1. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 11% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
TinyEnv is an environment variable loader for PHP applications. In versions 1.0.9 and 1.0.10, TinyEnv did not properly strip inline comments inside .env values. This could lead to unexpected behavior or misconfiguration, where variables contain unintended characters (including # or comment text). Applications depending on strict environment values may expose logic errors, insecure defaults, or failed authentication. The issue is fixed in v1.0.11. Users should upgrade to the latest patched version. As a temporary workaround, avoid using inline comments in .env files, or sanitize loaded values manually.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Packagist | datahihi1/tiny-env | 1.0.11 | GHSA-72cm-7236-h43r |
Affected products (as reported)
Weakness: CWE-20 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
References
- https://github.com/datahihi1/tiny-env/security/advisories/GHSA-72cm-7236-h43r x_refsource_CONFIRM