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

> Attackers can inject ANSI escape sequences into logs to manipulate terminal displays and mislead users via the tracing-subscriber library.

- **Severity:** Low 2.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 29 Aug 2025
- **Updated:** 2 Sep 2025
- **Also known as:** AZL-73211, AZL-73217, AZL-73220, AZL-73223, AZL-73244, AZL-73247, AZL-78618, AZL-81206, CLEANSTART-2026-UC60244, DEBIAN-CVE-2025-58160, GHSA-xwfj-jgwm-7wp5, MINI-24jc-rvm8-x3cq, MINI-55rr-q3g6-h3hq, MINI-7gj3-72wq-f5xj, MINI-8gvc-2w4w-pxvx, MINI-8h9w-c7cg-j8g3, MINI-cf84-fr3f-jjg7, MINI-f4h9-qqhh-w564, MINI-h5q5-5gjx-9x4r, MINI-hrgg-xv9m-p3vq, MINI-jc24-gwgp-v8gg, MINI-r45m-vpw3-v5xp, RUSTSEC-2025-0055, SUSE-SU-2025:03082-1, SUSE-SU-2025:3869-1, SUSE-SU-2025:4091-1, SUSE-SU-2026:20235-1, SUSE-SU-2026:20335-1, SUSE-SU-2026:22380-1, SUSE-SU-2026:23567-1, SUSE-SU-2026:23607-1, UBUNTU-CVE-2025-58160, openSUSE-SU-2025:15512-1, openSUSE-SU-2025:15514-1, openSUSE-SU-2025:15517-1, openSUSE-SU-2025:15518-1, openSUSE-SU-2025:15519-1, openSUSE-SU-2025:15540-1, openSUSE-SU-2025:15552-1, openSUSE-SU-2026:11028-1, openSUSE-SU-2026:20180-1, openSUSE-SU-2026:21074-1, openSUSE-SU-2026:21681-1, openSUSE-SU-2026:21741-1

## What is CVE-2025-58160?

CVE-2025-58160 is a low-severity vulnerability in tokio-rs tracing, published on 29 Aug 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-150 (Improper Neutralization of Escape, Meta, or Control Sequences)

## Which versions are affected by CVE-2025-58160?

3 open source packages ship an affected version, including tracing-subscriber.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `tracing-subscriber` | crates.io | All versions | 0.3.20 |
| `tracing-subscriber` | crates.io | All versions | 0.3.20 |
| `tracing-subscriber` | crates.io | From 0.0.0-0 | 0.3.20 |
| `himmelblau` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 0.7.18+git.0.8485a75-150700.3.6.1 |
| `loupe` | SUSE:Linux Enterprise Server 16.0 | All versions | 48.2-160000.1.1 |
| `python-maturin` | SUSE:Linux Enterprise Server 16.0 | All versions | 1.8.7-160000.3.1 |
| `python-ruff` | SUSE:Linux Enterprise Server 16.0 | All versions | 0.11.13-160000.3.1 |
| `rav1e` | SUSE:Linux Enterprise Server 16.0 | All versions | 0.8.1-160000.2.1 |
| `loupe` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 48.2-160000.1.1 |
| `python-maturin` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 1.8.7-160000.3.1 |
| `python-ruff` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 0.11.13-160000.3.1 |
| `rav1e` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 0.8.1-160000.2.1 |
| `python-maturin` | SUSE:Linux Micro 6.2 | All versions | 1.8.7-160000.3.1 |
| `cargo-packaging` | openSUSE:Leap 15.6 | All versions | 1.3.0+0-150600.3.3.1 |
| `python-maturin` | openSUSE:Leap 15.6 | All versions | 1.4.0-150600.3.9.1 |
| `rust-bindgen` | openSUSE:Leap 15.6 | All versions | 0.72.0-150600.13.3.1 |
| `loupe` | openSUSE:Leap 16.0 | All versions | 48.2-160000.1.1 |
| `python-maturin` | openSUSE:Leap 16.0 | All versions | 1.8.7-160000.3.1 |
| `python-ruff` | openSUSE:Leap 16.0 | All versions | 0.11.13-160000.3.1 |
| `rav1e` | openSUSE:Leap 16.0 | All versions | 0.8.1-160000.2.1 |
| `bpftop` | openSUSE:Tumbleweed | All versions | 0.7.1-1.1 |
| `cargo-packaging` | openSUSE:Tumbleweed | All versions | 1.3.0+0-2.1 |
| `himmelblau` | openSUSE:Tumbleweed | All versions | 1.2.2+git.0.2d04bca-1.1 |
| `python-maturin` | openSUSE:Tumbleweed | All versions | 1.9.4-1.1 |
| `python-ruff` | openSUSE:Tumbleweed | All versions | 0.12.11-2.1 |
| `python-uv` | openSUSE:Tumbleweed | All versions | 0.8.14-2.1 |
| `rav1e` | openSUSE:Tumbleweed | All versions | 0.8.1-2.1 |
| `rustup` | openSUSE:Tumbleweed | All versions | 1.28.2~0-2.1 |

## How do I fix CVE-2025-58160?

Upgrade tracing-subscriber to 0.3.20 or later.

## Is CVE-2025-58160 being exploited?

There is no known exploitation of CVE-2025-58160 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-58160 and fix it if it is affected.

What it is: CVE-2025-58160 is a low-severity vulnerability in tokio-rs tracing, published on 29 Aug 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-58160 in the wild and no public exploit code.

Affected packages and fixed versions:
- tracing-subscriber (crates.io): affected all versions; fixed in 0.3.20
- tracing-subscriber (crates.io): affected all versions; fixed in 0.3.20
- tracing-subscriber (crates.io): affected from 0.0.0-0; fixed in 0.3.20

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-58160/ (Markdown: https://insights.sbomify.com/CVE-2025-58160/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-58160
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-58160
- OSV: https://osv.dev/vulnerability/CVE-2025-58160

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-58160/
Summaries are generated and may contain mistakes; the official description above is the record.
