/

CVE-2026-52872

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in Streambert Electron Desktop App

CVE-2026-52872

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-73

Impact:

Arbitrary File Read and File Overwrite

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in Streambert allows a compromised renderer to cause the application to copy files from arbitrary readable locations. Because the renderer also controls the destination path, an attacker may disclose sensitive local data or overwrite files in writable locations.

Affected context

The vulnerability occurs in Streambert's subtitle-download workflow when the renderer invokes the download IPC channel with a subtitle URL using the file: scheme. Risk is present when renderer content is compromised and the StreamBERT process can read the selected source file and write to the renderer-controlled destination path.

Exploit preconditions

  • Attack surface: Electron renderer-to-main-process IPC handling
  • Required access: Control of, or code execution within, a Streambert renderer context
  • Trigger point: Subtitle download processing through the run-download channel
  • Relevant inputs: Renderer-controlled subtitle URL and download destination path
  • Why exploitation is possible: The decoded local pathname is passed to a file-copy operation without sufficiently restricting the source and destination paths

Why this happens

The underlying issue is insufficient validation of filesystem paths derived from renderer-controlled input. A file: URI is decoded into a local pathname and used as a source for file copying, while the destination is also controlled by the renderer. This behavior maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with CWE-73: External Control of File Name or Path also applicable because untrusted input influences filesystem locations.

Potential impact

  • Sensitive local files may be disclosed to an attacker-controlled location
  • Existing writable files may be overwritten or corrupted
  • Application data or user configuration may be modified
  • Persistence or follow-on compromise may become possible if high-value writable files are targeted
  • Confidentiality and integrity of data accessible to the StreamBERT process may be affected

General mitigation guidance

Mitigation generally focuses on reducing renderer authority and enforcing filesystem boundaries at the privileged IPC layer.

Common defensive patterns include:

  • Rejecting local-file schemes unless they are explicitly required and narrowly authorized
  • Resolving and canonicalizing paths before access, then enforcing approved source and destination directories
  • Deriving destination paths in the main process rather than trusting renderer-supplied paths
  • Using allowlists for permitted files, extensions, and download locations
  • Separating file-read and file-write capabilities and applying least privilege
  • Enforcing strong Electron context isolation, sandboxing, and narrow IPC contracts
  • Avoiding overwrites by default and requiring explicit, policy-controlled replacement behavior

How teams detect issues like this

Detection can combine static analysis, review practices, and runtime policy controls:

  • Search for filesystem APIs such as copyFileSync, readFile, and writeFile receiving values derived from IPC messages, URI parsing, or renderer input
  • Review IPC handlers for missing sender validation, path canonicalization, directory containment checks, and scheme restrictions
  • Use static analysis or automated code-review tools to trace untrusted renderer data into filesystem operations
  • Add tests for traversal sequences, alternate path representations, local-file URI handling, symbolic links, and destination escapes
  • Monitor file operations initiated by the application outside approved download directories
  • Enforce application policies that restrict renderer access to privileged filesystem capabilities

Sources

SourceLink
github.comgithub.com/truelockmc/streambert/security/advisories/GHSA-v74h-2468-rxhh

Frequently asked

questions

It is not necessarily a direct network attack. Exploitation generally requires a compromised renderer or another condition that allows attacker-controlled data to reach the privileged download IPC handler.

The attacker needs control of a Streambert renderer context or equivalent influence over the renderer-supplied subtitle URL and destination path. The StreamBERT process must also have permission to read the source and write to the destination.

Keep filesystem decisions in the privileged main process, restrict operations to approved directories, canonicalize paths, and reject unauthorized URI schemes and path relationships.

Use narrow, validated IPC interfaces; enable Electron isolation and sandboxing where practical; minimize renderer privileges; and continuously test data flows from untrusted input into filesystem APIs.

Find out what's already
exploitable in your codebase.