CVE-2025-48069 ejson2env has insufficient input sanitization
Insufficient output sanitization in ejson2env allows attackers to inject arbitrary commands via malicious secret values when output is executed.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-48069?
CVE-2025-48069 is a medium-severity command injection vulnerability in Shopify ejson2env, published on 21 May 2025. An attacker needs administrator access to exploit it, with no action from the victim.
Official description
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.
Weakness: CWE-78
Which versions are affected by CVE-2025-48069?
8 open source packages ship an affected version, including github.com/Shopify/ejson2env, github.com/Shopify/ejson2env/v2 and ejson2env.
| Package | Affected | Fixed in |
|---|---|---|
github.com/Shopify/ejson2env Go | All versions | None |
github.com/Shopify/ejson2env Go | All versions | None |
github.com/Shopify/ejson2env Go | All versions | None |
github.com/Shopify/ejson2env/v2 Go | All versions | 2.0.8 |
github.com/Shopify/ejson2env/v2 Go | All versions | 2.0.8 |
github.com/Shopify/ejson2env/v2 Go | All versions | 2.0.8 |
2 more packages
ejson2env RubyGems | All versions | 2.0.8 |
ejson2env RubyGems | All versions | 2.0.8 |
How do I fix CVE-2025-48069?
Upgrade to a fixed version.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2025-48069 being exploited?
There is no known exploitation of CVE-2025-48069 in the wild and no public exploit code.
Sources
Also known as GHSA-2c47-m757-32g6, GO-2025-3702.