CVE-2025-58758
JSON

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 packageVersionsReported by
datahihi1 tiny-env>= 1.0.1, < 1.0.3, >= 1.0.9, < 1.0.11CVE List
datahihi1/tiny-env (Packagist)before 1.0.3, from 1.0.9 before 1.0.11GitHub Advisory Database
datahihi1 tinyenvfrom 1.0.1 before 1.0.3, from 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
NVD7.3high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Classification

CWE-703

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

SourceRecordLicence
CVE ListCVE-2025-58758 changed 2025-09-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-3j7m-5g4q-gfpc changed 2025-09-10CC-BY-4.0
NVDCVE-2025-58758 changed 2026-06-17Public domain