{"id":"CVE-2025-58758","aliases":["CVE-2025-58758","GHSA-3j7m-5g4q-gfpc"],"related":[],"kind":"vulnerability","state":"published","title":"TinyEnv: Missing .env file not required — may cause unexpected behavior","summary":"TinyEnv is an environment variable loader for PHP applications. In versions 1.0.1, 1.0.2, 1.0.9, and 1.0.10, TinyEnv did not require the `.env` file to exist when loading environment variables. This could lead to unexpected behavior where the application silently ignores missing configuration, potentially causing insecure defaults or deployment misconfigurations. The issue has been fixed in version 1.0.11. All users should upgrade to 1.0.11 or later. As a workaround, users can manually verify the existence of the `.env` file before initializing TinyEnv.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"TinyEnv is an environment variable loader for PHP applications. In versions 1.0.1, 1.0.2, 1.0.9, and 1.0.10, TinyEnv did not require the `.env` file to exist when loading environment variables. This could lead to unexpected behavior where the application silently ignores missing configuration, potentially causing insecure defaults or deployment misconfigurations. The issue has been fixed in version 1.0.11. All users should upgrade to 1.0.11 or later. As a workaround, users can manually verify the existence of the `.env` file before initializing TinyEnv.","source":"cvelist"},{"lang":"en","text":"### Impact\nTinyEnv did not require the `.env` file to exist when loading environment variables.  \nThis could lead to **unexpected behavior** where the application silently ignores missing configuration, potentially causing insecure defaults or deployment misconfigurations.  \n\nAffected versions:  \n- **1.0.1 → 1.0.2**  \n- **1.0.9 → 1.0.10**\n\n### Patches\nThe issue has been fixed in **version 1.0.11**.  \nAll users should upgrade to `1.0.11` or later.\n\n### Workarounds\nAs a workaround, users can manually verify the existence of the `.env` file before initializing TinyEnv, for example:\n\n```php\nif (!file_exists(__DIR__ . '/.env')) {\n    throw new RuntimeException('.env file is missing!');\n}","format":"markdown","source":"ghsa"}],"published":"2025-09-09T19:50:18.518Z","modified":"2026-06-17T09:44:53.230Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":5.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"}],"cwes":["CWE-703"],"affected":[{"ranges":[{"version":">= 1.0.1, < 1.0.3","status":"affected"},{"version":">= 1.0.9, < 1.0.11","status":"affected"}],"vendor":"datahihi1","product":"tiny-env","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.0.3"}],"ecosystem":"Packagist","package":"datahihi1/tiny-env","purl":"pkg:composer/datahihi1/tiny-env","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.0.9","status":"affected","fixed":"1.0.11"}],"ecosystem":"Packagist","package":"datahihi1/tiny-env","purl":"pkg:composer/datahihi1/tiny-env","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.0.1","fixed":"1.0.3"},{"status":"affected","introduced":"1.0.9","fixed":"1.0.11"}],"vendor":"datahihi1","product":"tinyenv","cpe":"cpe:2.3:a:datahihi1:tinyenv:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/datahihi1/tiny-env/security/advisories/GHSA-3j7m-5g4q-gfpc","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/datahihi1/tiny-env/commit/69b7b885e6cfbf07f470fb3512360e0caa95521e","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-58758","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/datahihi1/tiny-env/commit/7dc656c58bef6050afb8f7a395e38227e31a66df","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/datahihi1/tiny-env","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-09-10T20:14:12.293Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-58758","url":"https://www.cve.org/CVERecord?id=CVE-2025-58758","licence":"CVE Terms of Use","modified":"2025-09-10T20:14:26.393Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3j7m-5g4q-gfpc","url":"https://github.com/advisories/GHSA-3j7m-5g4q-gfpc","licence":"CC-BY-4.0","modified":"2025-09-10T21:54:33.259Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-58758","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-58758","licence":"Public domain","modified":"2026-06-17T09:44:53.230Z"}],"updatedAt":"2026-11-25T22:59:04.459Z","epss":{"score":0.00344,"percentile":0.20333,"date":"2026-11-30T12:00:22.000Z"}}