5.1medium
TinyEnv: Missing .env file not required — may cause unexpected behavior
- Severity
- 5.1medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.34% (higher than 20% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-3j7m-5g4q-gfpc
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| datahihi1 tiny-env | >= 1.0.1, < 1.0.3, >= 1.0.9, < 1.0.11 | CVE List |
| datahihi1/tiny-env (Packagist) | before 1.0.3, from 1.0.9 before 1.0.11 | GitHub Advisory Database |
| datahihi1 tinyenv | from 1.0.1 before 1.0.3, from 1.0.9 before 1.0.11 | NVD |
All scores
| GitHub_M | 5.1medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| GitHub | 5.1medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| NVD | 7.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
Classification
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.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.
GitHub Advisory Database
Impact
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.
Affected versions:
- 1.0.1 → 1.0.2
- 1.0.9 → 1.0.10
Patches
The issue has been fixed in version 1.0.11.
All users should upgrade to 1.0.11 or later.
Workarounds
As a workaround, users can manually verify the existence of the .env file before initializing TinyEnv, for example:
if (!file_exists(__DIR__ . '/.env')) {
throw new RuntimeException('.env file is missing!');
}
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-58758 changed 2025-09-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-3j7m-5g4q-gfpc changed 2025-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-58758 changed 2026-06-17 | Public domain |