Loading...
Skip to main content

CVE-2025-48069 — Insufficient input sanitization in...

MEDIUM

Insufficient input sanitization in ejson2env

Published May 21, 2025Updated May 27, 2025Source: osv

Summary

### Summary The `ejson2env` tool has a vulnerability related to how it writes to `stdout`. Specifically, the tool is intended to write an export statement for environment variables and their values. However, due to inadequate output sanitization, there is a potential risk where variable names or values may include malicious content, resulting in additional unintended commands being output to `stdout`. If this output is improperly utilized in further command execution, it could lead to command injection vulnerabilities, allowing an attacker to execute arbitrary commands on the host system. ### Details The vulnerability exists because environment variables are not properly sanitized during the decryption phase, which enables malicious keys or encrypted values to inject commands. ### Impact An attacker with control over `.ejson` files can inject commands in the environment where `source $(ejson2env)` or `eval ejson2env` are executed. ### Mitigation - Update to a version of `ejson2env` that sanitizes the output during decryption or - Do not use `ejson2env` to decrypt untrusted user secrets or - Do not evaluate or execute the direct output from `ejson2env` without removing nonprintable characters. ### Credit Thanks to security researcher [Demonia](https://hackerone.com/demonia?type=user) for reporting this issue.

Advisory Timeline

  • First published May 21, 2025 (509 days ago).
  • Last revised May 27, 2025 — 6 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update ejson2env to 2.0.8 or later
gem install ejson2env -v 2.0.8
Go
Update github.com/Shopify/ejson2env/v2 to 2.0.8 or later
go get github.com/Shopify/ejson2env/v2@v2.0.8

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 2 ecosystems: go (2), rubygems (1).

PackageEcosystemAffectedFixed In
github.com/Shopify/ejson2env
go
All versionsRange-based data available
ejson2env
rubygems
1.0.0, 1.0.2, 1.0.3, 1.0.4 (+4 more)2.0.8
github.com/Shopify/ejson2env/v2
go
All versions2.0.8

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-78
    OS Command InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.6 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2025-48069?
Insufficient input sanitization in ejson2env This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.6/10).
How do I check if my project is affected by CVE-2025-48069?
CVE-2025-48069 affects github.com/Shopify/ejson2env, ejson2env and github.com/Shopify/ejson2env/v2. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-48069 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.6

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-2c47-m757-32g6
GO-2025-3702

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies