CVE-2025-58759
JSON

5.1medium

TinyEnv: Inline comments not stripped properly in .env values

Severity
5.1medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.22% (higher than 13% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-72cm-7236-h43r

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

Product or packageVersionsReported by
datahihi1 tiny-env>= 1.0.9, < 1.0.11CVE List
datahihi1/tiny-env (Packagist)from 1.0.9 before 1.0.11GitHub Advisory Database
datahihi1 tinyenvfrom 1.0.9 before 1.0.11NVD

All scores

GitHub_M5.1medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
GitHub5.1medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Classification

CWE-20

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

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.

Patches

Fixed in v1.0.11. Users should upgrade to the latest patched version.

Workarounds

As a temporary workaround, avoid using inline comments in .env files, or sanitize loaded values manually.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-58759 changed 2025-09-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-72cm-7236-h43r changed 2025-09-10CC-BY-4.0
NVDCVE-2025-58759 changed 2026-06-17Public domain