CVE-2025-48069 ejson2env has insufficient input sanitization

Medium 6.6 Published Updated

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.

PackageAffectedFixed in
github.com/Shopify/ejson2env GoAll versionsNone
github.com/Shopify/ejson2env GoAll versionsNone
github.com/Shopify/ejson2env GoAll versionsNone
github.com/Shopify/ejson2env/v2 GoAll versions2.0.8
github.com/Shopify/ejson2env/v2 GoAll versions2.0.8
github.com/Shopify/ejson2env/v2 GoAll versions2.0.8
2 more packages
ejson2env RubyGemsAll versions2.0.8
ejson2env RubyGemsAll versions2.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.

Is CVE-2025-48069 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free