CVE-2025-58759 TinyEnv: Inline comments not stripped properly in .env values
Improper stripping of inline comments in .env files can cause misconfigurations, potentially leading to authentication failures or insecure defaults in PHP applications.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-58759?
CVE-2025-58759 is a medium-severity vulnerability in datahihi1 tiny-env, published on 9 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.
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.
Weakness: CWE-20
Which versions are affected by CVE-2025-58759?
2 open source packages ship an affected version, including datahihi1/tiny-env. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
datahihi1/tiny-env Packagist | From 1.0.9 | 1.0.11 |
datahihi1/tiny-env Packagist | From 1.0.9 | 1.0.11 |
Products include Datahihi1 Tinyenv.
How do I fix CVE-2025-58759?
Upgrade datahihi1/tiny-env to 1.0.11 or later.
Is CVE-2025-58759 being exploited?
There is no known exploitation of CVE-2025-58759 in the wild and no public exploit code.
Other vulnerabilities in datahihi1 tiny-env
Sources
Also known as GHSA-72cm-7236-h43r.