Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCreate filename with embedded OSC/CSI escape sequence
-
DeliveryPlace file in shared or browsable directory
-
ExploitVictim browses directory using broot
-
Executionbroot writes unsanitized filename to PTY
-
PersistTerminal emulator interprets escape sequence
-
ImpactAttacker achieves clipboard hijack or terminal state manipulation
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Escape character neutralization
|
| Exploitation Conditions | The attacker must have low-privilege local write access to any directory on the filesystem (PR:L) - no special broot configuration, feature flag, or elevated permission is required. Exploitation requires a victim to actively browse the directory containing the malicious filename using broot (UI:P); simply having broot installed is not sufficient. The exploit path is broot's primary function (tree browsing), meaning no obscure or non-default mode is needed. The key limiting factor is the terminal emulator in use: the injected sequence must be interpreted by the terminal for any meaningful impact - terminals that ignore unsupported OSC/CSI sequences will exhibit no effect beyond displaying the U+FFFD replacement character (or similar) after patching. Clipboard hijacking via OSC 52 specifically requires the terminal emulator to support and honor that sequence (e.g., xterm with allowWindowOps, some VTE-based terminals). Attack is constrained to local system access; no network vector exists. |
| Impact | The official CVSS 4.0 score of 2.4 accurately reflects the limited realistic impact: the attack is strictly local (AV:L), requires only low-privilege filesystem write access (PR:L), and demands passive victim interaction (UI:P - someone must browse the directory with broot). No EPSS data is provided in available intelligence; the vulnerability is not listed in CISA KEV. A proof of concept exists as documented in the CVE description and the GitHub issue. The VC:L/VI:L downstream-system impacts (SC:L/SI:L) capture the realistic terminal-emulator-dependent consequences - clipboard hijacking via OSC 52 is confirmed by the POC, but broader impact (e.g., executing arbitrary terminal commands via CSI sequences) depends entirely on the terminal emulator's feature set and security posture. The primary real-world risk scenario is multi-user shared Linux or container environments where different-privilege users share writable directories and independently run broot. Single-user workstations where the attacker already has local access present negligible additional risk beyond what the attacker already possesses. |
| Exploit ScenarioDerived | On a multi-user Linux system, an unprivileged attacker creates a file named with an embedded OSC 52 sequence such as $'\x1b]52;c;base64encodedpayload\x07legit_filename.txt' in a shared directory. When a targeted user (e.g., a system administrator) browses that directory with broot, broot renders the filename verbatim to their terminal, causing their terminal emulator to execute the OSC 52 command and overwrite their clipboard with attacker-controlled content. A proof of concept confirming the OSC 52 sequence reaches the terminal unstripped has been reported in the GitHub issue tracker. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
Terminal escape sequence injection in broot, the interactive Rust-based file tree navigator by Canop, allows any local user with filesystem write access to plant control characters in a filename and have them written verbatim to the terminal of any other user who browses that directory with broot. The vulnerable code path - to_string_lossy() in src/tree/tree_line.rs and src/tree_build/builder.rs - applies no control-character filtering despite an existing doc comment implying sanitization occurs. A proof of concept embedding an OSC 52 clipboard-write sequence confirmed that raw escape bytes reach the terminal unstripped; the terminal emulator then determines the actual impact, ranging from cosmetic disruption to clipboard hijacking. No public exploit identified at time of analysis beyond the reported proof of concept; the vulnerability is not listed in CISA KEV.
RemediationAI
Upstream fix available via commits 4ba40f7d47af78457c7656f15eba71d63d97fce5 and 0717a94b3c0efa19c7bbcfe0fb49a2374752a168; upgrade to the first tagged broot release incorporating these commits (exact patched release version not independently confirmed - verify the current release at https://github.com/Canop/broot). The fix introduces sanitize_display_name(), which maps all Rust is_control() characters to U+FFFD before any filename is written to the terminal. As a compensating control where patching is not immediately possible, restrict write access to directories browsed with broot to trusted users only, since the attack requires an attacker to create a file in a directory the victim will navigate to. Using a terminal emulator that strips or ignores unrecognized OSC and CSI sequences (many modern hardened terminals do) reduces the exploitable surface but is not a reliable control: the sequences still reach the terminal layer, and emulator behavior is not under the victim's direct control. Avoid running broot as a privileged user over directories writable by lower-privileged users.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
broot is a Rust terminal application (CPE: cpe:2.3:a:canop:broot:*:*:*:*:*:*:*:*) that renders filesystem trees in an interactive PTY-based UI. Filenames are obtained as OsStr values from the OS and converted with to_string_lossy(), which produces a Cow<str> without stripping any bytes. These strings are written directly into broot's styled terminal output between ANSI styling codes, meaning any embedded control characters are passed through to the PTY. CWE-150 (Improper Neutralization of Escape, Meta, or Control Sequences) applies precisely: the code fails to neutralize OSC (Operating System Command, ESC ]), CSI (Control Sequence Introducer, ESC [), and other ANSI escape sequences embedded in data that originates from an untrusted source - the filesystem - before writing to the terminal. The specific vulnerable functions are TreeLineBuilder in src/tree_build/builder.rs and TreeLine::unprune in src/tree/tree_line.rs. The fix adds a sanitize_display_name() function that replaces all control characters (c.is_control()) with the Unicode replacement character U+FFFD.
Know when Broot gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
Local write access plants the payload; victim must actively browse with broot; scope changes as the terminal emulator (separate component) is affected; no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
broot renders each file and directory name in its interactive tree view exactly as read from the filesystem. Names are converted with a plain to_string_lossy() call in src/tree_build/builder.rs and in TreeLine::unprune in src/tree/tree_line.rs, and no control-character filtering exists anywhere in the code, even though the doc comment on the TreeLine name field states that some characters may have been stripped. Any local user who can create a file can therefore place an escape sequence in its name and have it written unmodified to the terminal of anyone who browses that directory, between broot's own styling codes. A reported proof of concept used an OSC 52 clipboard-write sequence and captured the raw bytes broot wrote to its pty, confirming the sequence reaches the terminal unstripped. What an injected OSC or CSI sequence can then do depends on the terminal emulator in use. Browsing a directory is broot's primary function and carries no expectation that the content is trusted.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
EUVD-2026-63488
GHSA-8v8c-hvqj-mqw8
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB