Skip to content

TinyEnv: Missing .env file not required — may cause unexpected behavior

Moderate severity GitHub Reviewed Published Sep 8, 2025 in datahihi1/tiny-env • Updated Sep 10, 2025

Package

composer datahihi1/tiny-env (Composer)

Affected versions

< 1.0.3
>= 1.0.9, < 1.0.11

Patched versions

1.0.3
1.0.11

Description

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
- https://github.com/datahihi1/tiny-env/security/advisories/GHSA-3j7m-5g4q-gfpc
- https://github.com/datahihi1/tiny-env/commit/7dc656c58bef6050afb8f7a395e38227e31a66df
- https://nvd.nist.gov/vuln/detail/CVE-2025-58758
- https://github.com/datahihi1/tiny-env/commit/69b7b885e6cfbf07f470fb3512360e0caa95521e
@datahihi1 datahihi1 published to datahihi1/tiny-env Sep 8, 2025
Published by the National Vulnerability Database Sep 9, 2025
Published to the GitHub Advisory Database Sep 9, 2025
Reviewed Sep 9, 2025
Last updated Sep 10, 2025

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(1st percentile)

Weaknesses

Improper Check or Handling of Exceptional Conditions

The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product. Learn more on MITRE.

CVE ID

CVE-2025-58758

GHSA ID

GHSA-3j7m-5g4q-gfpc

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.