CVE-2025-58160: Tracing subscriber Tracing Logging User Input May Vulnerability
LOWCVE-2025-58160 is a LOW tracing logging user input may vulnerability (CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences) affecting Tracing subscriber libraries in the crates.io ecosystem. The issue involves tracing logging user input may result in poisoning logs with ansi escape sequences. Remediation is available by upgrading affected packages to version 0.3.20.
CVE-2025-58160 at a Glance
How to Fix CVE-2025-58160
To remediate this vulnerability, upgrade all affected Tracing subscriber dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade tracing-subscriber to 0.3.20
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for tracing-subscriber
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-58160, inspect your project dependencies for Tracing subscriber:
inspect dependencies for tracing-subscriber
Analyze the terminal output to locate any version of Tracing subscriber in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.20), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences, where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as escape, meta, or control character sequences when they are sent to a downstream component. In Tracing subscriber, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-58160 Affected Tracing subscriber Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tracing-subscriber
|
crates.io |
< 0.3.20
|
0.3.20
|
References
Frequently Asked Questions
What is CVE-2025-58160?
Which Tracing subscriber versions are affected?
What version fixes CVE-2025-58160?
Is tracing-subscriber affected?
What CWE is associated with CVE-2025-58160?
How can I check crates.io dependencies for CVE-2025-58160?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xwfj-jgwm-7wp5",
"modified" : "2025-09-02T16:35:51Z",
"published" : "2025-08-29T20:33:56Z",
"aliases" : [ "CVE-2025-58160" ],
"summary" : " Tracing logging user input may result in poisoning logs with ANSI escape sequences",
"details" : "### Impact\n\nPrevious versions of tracing-subscriber were 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:\n\n- Manipulate terminal title bars\n- Clear screens or modify terminal display\n- Potentially mislead users through terminal manipulation\n\nIn isolation, impact is minimal, however security issues have been found in terminal emulators that enabled an attacker to use ANSI escape sequences via logs to exploit vulnerabilities in the terminal emulator.\n\n### Patches\n\n`tracing-subscriber` version 0.3.20 fixes this vulnerability by escaping ANSI control characters in when writing events to destinations that may be printed to the terminal.\n\n### Workarounds\n\nAvoid printing logs to terminal emulators without escaping ANSI control sequences.\n\n### References\n\nhttps://www.packetlabs.net/posts/weaponizing-ansi-escape-sequences/\n\n\n### Acknowledgments\n\nWe would like to thank [zefr0x](http://github.com/zefr0x) who responsibly reported the issue at `security@tokio.rs`.\n\nIf you believe you have found a security vulnerability in any tokio-rs project, please email us at `security@tokio.rs`.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "tracing-subscriber"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.20"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tokio-rs/tracing/security/advisories/GHSA-xwfj-jgwm-7wp5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-58160"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tokio-rs/tracing"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2025-0055.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-150" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-29T20:33:56Z",
"nvd_published_at" : "2025-08-29T22:15:32Z"
}
}