CVE-2025-58160: Tracing subscriber Tracing Logging User Input May Vulnerability

LOW
Advisory Identifier: GHSA-xwfj-jgwm-7wp5
CWE-150
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2025-58160
GHSA Identifier GHSA-xwfj-jgwm-7wp5
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences
Affected Product Tracing subscriber
Package Ecosystem crates.io
Published Date
Last Updated

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.

tracing-subscriber fixed: 0.3.20
Upgrade tracing-subscriber to 0.3.20
Verify Direct and Transitive Dependencies

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

### Impact Previous 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: - Manipulate terminal title bars - Clear screens or modify terminal display - Potentially mislead users through terminal manipulation In 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. ### Patches `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. ### Workarounds Avoid printing logs to terminal emulators without escaping ANSI control sequences. ### References https://www.packetlabs.net/posts/weaponizing-ansi-escape-sequences/ ### Acknowledgments We would like to thank [zefr0x](http://github.com/zefr0x) who responsibly reported the issue at `security@tokio.rs`. If you believe you have found a security vulnerability in any tokio-rs project, please email us at `security@tokio.rs`.

CVE-2025-58160 Affected Tracing subscriber Versions

1 component(s)
Fixed Versions:
0.3.20
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?
CVE-2025-58160 is a security vulnerability in Tracing subscriber involving Tracing logging user input may result in poisoning logs with ANSI escape sequences under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences.
Which Tracing subscriber versions are affected?
Affected versions include releases prior to 0.3.20 across affected packages: tracing-subscriber.
What version fixes CVE-2025-58160?
Upgrading to 0.3.20 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tracing-subscriber affected?
Yes, tracing-subscriber is affected in releases prior to 0.3.20. Upgrade your dependency to 0.3.20 or later.
What CWE is associated with CVE-2025-58160?
CVE-2025-58160 is classified under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences (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.).
How can I check crates.io dependencies for CVE-2025-58160?
Run the dependency tree command: 'inspect dependencies for tracing-subscriber'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}