Skip to content
Heist/ feed
Back to feed
Medium

TinyEnv: Inline comments not stripped properly in .env values

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-58759
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 01:10 UTC · Revision 1

Source evidence

TinyEnv: Inline comments not stripped properly in .env values

core-osv · Original source

Published 9 Sept 2025, 19:52 UTC

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.

osv:CVE-2025-58759
Complete source record
{
  "id": "8153233320dd12592c69bf8de436dd0f9643c2f6057f44a580006954ffdd2e18",
  "url": "https://osv.dev/vulnerability/CVE-2025-58759",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "TinyEnv: Inline comments not stripped properly in .env values",
    "summary": "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.",
    "evidence": "osv:CVE-2025-58759",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-58759",
      "aliases": [
        "CVE-2025-58759",
        "GHSA-72cm-7236-h43r"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/datahihi1/tiny-env",
              "type": "GIT",
              "events": [
                {
                  "introduced": "64e077577b75215983a91671248178910eeea133"
                },
                {
                  "fixed": "69b7b885e6cfbf07f470fb3512360e0caa95521e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "1.0.9"
                      },
                      {
                        "fixed": "1.0.11"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:datahihi1:tinyenv:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.0.9"
                      },
                      {
                        "fixed": "1.0.11"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.0.10",
            "1.0.9"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-58759.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.532971362Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/58xxx/CVE-2025-58759.json",
        "https://github.com/datahihi1/tiny-env/security/advisories/GHSA-72cm-7236-h43r",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-58759"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-20"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/58xxx/CVE-2025-58759.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-58759",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 521226,
  "published_at": "2025-09-09T19:52:39.014+00:00"
}