Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-58160: CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences in tokio-rs tracing

0
Low
VulnerabilityCVE-2025-58160cvecve-2025-58160cwe-150
Published: Fri Aug 29 2025 (08/29/2025, 21:28:22 UTC)
Source: CVE Database V5
Vendor/Project: tokio-rs
Product: tracing

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.

AI-Powered Analysis

AILast updated: 09/07/2025, 00:44:13 UTC

Technical Analysis

CVE-2025-58160 is a vulnerability identified in the tracing-subscriber crate, part of the tracing framework used for instrumenting Rust programs to collect structured, event-based diagnostic information. The vulnerability is classified under CWE-150, which involves improper neutralization of escape, meta, or control sequences. Specifically, versions of tracing-subscriber prior to 0.3.20 do not properly escape ANSI escape sequences in untrusted user input when logging events to terminal outputs. This flaw allows an attacker to inject ANSI escape sequences into terminal output, which can manipulate terminal behavior such as changing terminal title bars, clearing the screen, or altering the terminal display. Such manipulations can mislead users or obscure malicious activity. The vulnerability does not directly compromise confidentiality or integrity of data but can be used to deceive users or hide terminal output, potentially facilitating social engineering or obfuscation of malicious commands. The issue is mitigated in tracing-subscriber version 0.3.20 by escaping ANSI control characters before writing events to terminal destinations. A temporary workaround involves avoiding printing logs directly to terminal emulators without proper escaping of ANSI sequences. The CVSS 4.0 base score is 2.3, indicating a low severity, reflecting the limited impact and the requirement for user interaction (e.g., viewing terminal output). No known exploits are reported in the wild as of the publication date.

Potential Impact

For European organizations, the impact of this vulnerability is primarily related to the potential for terminal manipulation and user deception rather than direct system compromise. Organizations using Rust applications instrumented with vulnerable versions of tracing-subscriber that output logs to terminals may face risks where attackers can inject malicious ANSI sequences via untrusted input. This could lead to misleading terminal displays, potentially tricking system administrators or developers into executing unintended commands or overlooking suspicious activity. While the vulnerability does not allow direct code execution or data exfiltration, it can be leveraged in multi-stage attacks involving social engineering or to conceal malicious actions in terminal logs. The impact is more pronounced in environments where terminal logs are routinely reviewed by humans and where trust in terminal output is critical. European organizations with development or operational environments using Rust and the tracing framework should be aware of this risk, especially in sectors with high security requirements such as finance, critical infrastructure, and government.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should: 1) Upgrade tracing-subscriber to version 0.3.20 or later, which includes the fix that escapes ANSI control characters in terminal output. 2) Audit Rust applications and services to identify usage of vulnerable tracing versions and prioritize patching in development, staging, and production environments. 3) Implement input validation and sanitization to reduce the risk of untrusted input containing ANSI escape sequences reaching logging components. 4) Avoid logging untrusted user input directly to terminal emulators without proper escaping or filtering of control sequences. 5) Educate developers and system administrators about the risks of ANSI escape sequence injection and encourage cautious interpretation of terminal outputs, especially when unexpected terminal behavior is observed. 6) Consider using centralized logging solutions that do not render ANSI sequences or that sanitize logs before display, reducing reliance on terminal output for log review. 7) Monitor for suspicious terminal behavior or anomalies in logs that could indicate exploitation attempts.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-08-27T13:34:56.186Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 68b21c80ad5a09ad007ba03d

Added to database: 8/29/2025, 9:32:48 PM

Last enriched: 9/7/2025, 12:44:13 AM

Last updated: 10/14/2025, 4:05:23 PM

Views: 49

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats