---
id: CVE-2026-72847
title: >-
  broot renders each file and directory name in its interactive tree view
  exactly as read from the filesystem
summary: >-
  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_l…
severity: medium
cvss: 4.6
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'
cwe:
  - CWE-150
vendor: Canop
product: broot
affected:
  - broot <= 1.58.0
published: '2026-08-20'
updated: '2026-09-24'
sourceUpdated: '2026-09-24T20:06:30.133'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-72847'
references:
  - url: 'https://github.com/Canop/broot'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/Canop/broot/blob/v1.58.0/src/tree/tree_line.rs'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/Canop/broot/blob/v1.58.0/src/tree_build/builder.rs'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/Canop/broot/commit/0717a94b3c0efa19c7bbcfe0fb49a2374752a168
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/Canop/broot/commit/4ba40f7d47af78457c7656f15eba71d63d97fce5
    label: disclosure@vulncheck.com
  - url: 'https://github.com/Canop/broot/issues/1188'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/broot-terminal-escape-sequence-injection-via-unsanitized-file-and-directory-names-in-the-tree-view
    label: disclosure@vulncheck.com
  - url: 'https://github.com/Canop/broot/issues/1188'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
  - cve.org
  - exploit-available
epss: 0.00146
epssPercentile: 0.03191
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-08-21T16:22:34.537761Z'
ingestedAt: '2026-09-24T15:45:56.713Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
