CVE-2025-48069

CVE-2025-48069 is a medium-severity OS command injection vulnerability in github.com/Shopify/ejson2env/v2 (go), affecting versions < 2.0.8. It is fixed in 2.0.8.

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.

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.

Impact

An attacker with control over .ejson files can inject commands in the environment where source $(ejson2env) or eval ejson2env are executed.

Untrusted input reaches a shell command, allowing arbitrary commands to run on the host. Typical impact: code execution in the application's environment.

CVE-2025-48069 has a CVSS score of 6.6 (Medium). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.0.8); upgrading removes the vulnerable code path.

Affected versions

github.com/Shopify/ejson2env/v2 (< 2.0.8) ejson2env (< 2.0.8) github.com/Shopify/ejson2env (< 2.0.8)

Security releases

github.com/Shopify/ejson2env/v2 → 2.0.8 (go) ejson2env → 2.0.8 (rubygems)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

github.com/Shopify/ejson2env/v2 to 2.0.8 or later; ejson2env to 2.0.8 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-48069? CVE-2025-48069 is a medium-severity OS command injection vulnerability in github.com/Shopify/ejson2env/v2 (go), affecting versions < 2.0.8. It is fixed in 2.0.8. Untrusted input reaches a shell command, allowing arbitrary commands to run on the host.
  2. How severe is CVE-2025-48069? CVE-2025-48069 has a CVSS score of 6.6 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2025-48069?
    • github.com/Shopify/ejson2env/v2 (go) (versions < 2.0.8)
    • ejson2env (rubygems) (versions < 2.0.8)
    • github.com/Shopify/ejson2env (go) (versions < 2.0.8)
  4. Is there a fix for CVE-2025-48069? Yes. CVE-2025-48069 is fixed in 2.0.8. Upgrade to this version or later.
  5. Is CVE-2025-48069 exploitable, and should I be worried? Whether CVE-2025-48069 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-48069 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-48069?
    • Upgrade github.com/Shopify/ejson2env/v2 to 2.0.8 or later
    • Upgrade ejson2env to 2.0.8 or later

Other vulnerabilities in github.com/Shopify/ejson2env/v2

Stop the waste.
Protect your environment with Kodem.