Every CVE Search/ Get API key

CVE-2025-48069

ejson2env has insufficient input sanitization

6.6 MediumFix available

ejson2env allows users to decrypt EJSON secrets and export them as environment variables. Prior to version 2.0.8, 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, allowing an attacker to execute arbitrary commands on the host system. Version 2.0.8 sanitizes output during decryption. Other mitigations involve avoiding use of ejson2env to decrypt untrusted user secrets and/or avoiding evaluating or executing the direct output from ejson2env without removing nonprintable characters.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
High
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

1.42%Up 1.3 points since May 22, 2025
90%50%10%1%

What each source reports

CVE List Score used 6.6

ejson2env has insufficient input sanitization

ejson2env allows users to decrypt EJSON secrets and export them as environment variables. Prior to version 2.0.8, 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, allowing an attacker to execute arbitrary commands on the host system. Version 2.0.8 sanitizes output during decryption. Other mitigations involve avoiding use of ejson2env to decrypt untrusted user secrets and/or avoiding evaluating or executing the direct output from ejson2env without removing nonprintable characters.

Record
CVE-2025-48069
CVSS 3.1
6.6 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02
EUVDEUVD-2025-16051 6.6

ejson2env allows users to decrypt EJSON secrets and export them as environment variables. Prior to version 2.0.8, 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, allowing an attacker to execute arbitrary commands on the host system. Version 2.0.8 sanitizes output during decryption. Other mitigations involve avoiding use of ejson2env to decrypt untrusted user secrets and/or avoiding evaluating or executing the direct output from ejson2env without removing nonprintable characters.

Record
EUVD-2025-16051
CVSS 3.1
6.6 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-2c47-m757-32g6 6.6

Insufficient input sanitization in ejson2env

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 for reporting this issue.

Record
GHSA-2c47-m757-32g6
CVSS 3.1
6.6 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02
NVD 6.6

ejson2env allows users to decrypt EJSON secrets and export them as environment variables. Prior to version 2.0.8, 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, allowing an attacker to execute arbitrary commands on the host system. Version 2.0.8 sanitizes output during decryption. Other mitigations involve avoiding use of ejson2env to decrypt untrusted user secrets and/or avoiding evaluating or executing the direct output from ejson2env without removing nonprintable characters.

Record
CVE-2025-48069
CVSS 3.1
6.6 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02
OSV 6.6

ejson2env has insufficient input sanitization

ejson2env allows users to decrypt EJSON secrets and export them as environment variables. Prior to version 2.0.8, 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, allowing an attacker to execute arbitrary commands on the host system. Version 2.0.8 sanitizes output during decryption. Other mitigations involve avoiding use of ejson2env to decrypt untrusted user secrets and/or avoiding evaluating or executing the direct output from ejson2env without removing nonprintable characters.

Record
CVE-2025-48069
CVSS 3.1
6.6 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02
OSVGHSA-2c47-m757-32g6 6.6

Insufficient input sanitization in ejson2env

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 for reporting this issue.

Record
GHSA-2c47-m757-32g6
CVSS 3.1
6.6 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02
OSVGO-2025-3702 No score

Insufficient input sanitization in ejson2env in github.com/Shopify/ejson2env

Insufficient input sanitization in ejson2env in github.com/Shopify/ejson2env

Record
GO-2025-3702
Updated
2026-11-02
OSVopenSUSE-SU-2025:15159-1 No score

govulncheck-vulndb-0.0.20250523T151856-1.1 on GA media

These are all security issues fixed in the govulncheck-vulndb-0.0.20250523T151856-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:15159-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/Shopify/ejson2env/v2
Go
before 2.0.8
2.0.8
ejson2env
RubyGems
before 2.0.8
2.0.8
github.com/Shopify/ejson2env
Go
before 2.0.8
2.0.8
ejson2env
RubyGems
before 2.0.8, plus listed versions
1.0.01.0.21.0.31.0.41.1.02.0.02.0.12.0.5
2.0.8
github.com/Shopify/ejson2env
Go
All versions None known
govulncheck-vulndb
openSUSE:Tumbleweed
before 0.0.20250523T151856-1.1
0.0.20250523T151856-1.1

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-48069 is a medium vulnerability (CVSS 6.6) in Shopify Ejson2env, published May 21, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.42%, the 73rd percentile. Fixed in github.com/Shopify/ejson2env/v2 2.0.8.

References

Show 16 moreShow less
MoveEnter Open