/

CVE-2026-130156

Severity:

CRITICAL RISK

(9.4)

Path Traversal (CWE-22) in Bazarr Subtitle API Endpoints

CVE-2026-130156

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary file read and write within the Bazarr process's permissions

Severity:

CRITICAL RISK

(9.4)

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

Bazarr's subtitle API can read files outside the media library and, through subtitle synchronization or translation, may overwrite files outside it. The risk arises when an accessible endpoint processes caller-supplied paths without ensuring they stay within authorized media files; the affected files are limited by the Bazarr process's permissions.

Affected context

The issue affects Bazarr's /api/subtitles/subtitles-info and /api/subtitles/subtitles handlers. The first checks the supplied subtitle file's extension but does not confine its resolved path to files indexed by Bazarr; the second passes supplied paths and references to synchronization and translation without per-path authorization. The authentication decorator gates both endpoints when API authentication is enabled; when auth = None, they can be accessed without credentials.

Exploit preconditions

  • Attack surface: The Bazarr subtitle API endpoints must be reachable.
  • Required access: If API authentication is enabled, valid access through the configured authentication mechanism is required. With auth = None, credentials are not required.
  • Trigger point: A request supplies a path to the subtitles-info handler or a path and reference to the subtitles handler for synchronization or translation.
  • Why exploitation is possible: The handlers do not consistently verify that resolved paths refer to authorized files within the media library.
  • Permission boundary: Reads and writes are limited to files the Bazarr process can access.

Why this happens

The underlying bug is insufficient path validation and authorization, mapping to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). Checking a filename extension does not establish that its resolved path is inside an allowed directory, and accepting paths for file operations without per-path authorization can expose files beyond the intended media-library boundary.

Potential impact

  • An attacker with access to the endpoints may read files outside the media library that the Bazarr process can access.
  • Synchronization or translation may overwrite files outside the media library within the process's write permissions.
  • Exposed or modified files could affect the confidentiality or integrity of the host or application environment.

General mitigation guidance

Defensive patterns focus on keeping file operations within explicit, authorized boundaries:

  • Resolve supplied paths to canonical paths and verify they remain under an approved media-library root.
  • Prefer server-side identifiers for indexed files over accepting arbitrary filesystem paths.
  • Apply per-file authorization to paths and references used for reading, synchronization, and translation.
  • Use restrictive file permissions and run the application with only the filesystem access it needs.
  • Require authentication for API access and avoid configurations that expose sensitive endpoints without credentials.
  • Validate inputs against an explicit schema and reject paths that do not map to approved files.

How teams detect issues like this

  • Use static analysis to flag file operations that consume request-controlled paths without canonicalization and directory-boundary checks.
  • Review API handlers for extension-only validation, missing per-resource authorization, or path parameters passed to read and write operations.
  • Test policy enforcement with requests targeting paths outside the configured media-library roots, verifying that both reads and writes are rejected.
  • Monitor application access logs and filesystem activity for unusual requests or file operations outside expected media directories.

Sources

SourceLink
github.comgithub.com/morpheus65535/bazarr/commit/d84777c61a34a90a37238cfb566e7e8cd102d303
github.comgithub.com/morpheus65535/bazarr/releases/tag/v1.6.3-beta.11
github.comgithub.com/morpheus65535/bazarr/security/advisories/GHSA-2876-64fx-p4m9

Frequently asked

questions

It can be reached through the subtitle API if the endpoints are accessible to the requester. Authentication requirements depend on the Bazarr API configuration.

No. The authentication decorator gates the endpoints when API authentication is enabled, but auth = None allows access without credentials.

Resolve paths canonically, restrict operations to explicitly authorized files under approved directories, and apply per-path authorization to reads and writes.

Avoid trusting caller-supplied filesystem paths, enforce directory-boundary checks and file permissions, and review file operations for authorization and path-validation gaps.

Find out what's already
exploitable in your codebase.