/

CVE-2026-71209

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in Audiobookshelf Cover Cache

CVE-2026-71209

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthenticated Arbitrary File Read

Severity:

HIGH RISK

(7.5)

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

Audiobookshelf contains a path-traversal flaw in its authentication-exemption handling for cover and author-image routes. An unauthenticated request may bypass the intended ownership check and read service-account-accessible files when encoded path separators are decoded before cache-path construction.

Affected context

The vulnerability occurs in Audiobookshelf's authentication routing and cover-cache processing when URL-encoded path data is handled differently by the route-matching check and the downstream request handler. It is relevant where unauthenticated cover or author-image routes are enabled, encoded separators are accepted by the router, and the resulting decoded value is incorporated into a filesystem path before an ownership or authorization check.

Exploit preconditions

  • Attack surface: HTTP endpoints serving cover or author-image resources
  • Required access: Network access to the Audiobookshelf service; authentication may not be required
  • Trigger point: Processing of a route parameter that is URL-decoded before cache-path construction
  • Why exploitation is possible: The authentication-exemption check evaluates the encoded request path, while later file handling uses the decoded parameter, allowing path validation and filesystem resolution to disagree
  • Additional condition: The targeted file must be readable by the Audiobookshelf service account and conform to the cache-serving filename pattern

Why this happens

The underlying bug is inconsistent canonicalization between authorization logic and filesystem path handling. The route exemption checks one representation of the URL, while Express supplies a decoded route parameter to later code; the cache component then joins that value into a filesystem path without sufficiently constraining it to the intended cache directory.

This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). The insecure pattern is validating or authorizing a non-canonical path representation and subsequently using a different, decoded representation for file access.

Potential impact

  • An unauthenticated user may read selected files accessible to the service account
  • Sensitive configuration, metadata, or application files could be disclosed
  • Exposed credentials or tokens could enable further compromise
  • Confidentiality of hosted audiobook and user data may be reduced
  • Information gathered from readable files could support follow-on attacks

General mitigation guidance

Mitigation generally focuses on canonicalizing input once and applying the same canonical representation to routing, authorization, validation, and filesystem access.

Common defensive patterns include:

  • Resolve requested paths against a fixed cache directory and reject results that escape that directory
  • Prefer opaque identifiers or server-side mappings over user-controlled filesystem fragments
  • Validate route parameters against a strict allowlist before constructing paths
  • Perform authorization and ownership checks after canonicalization and before opening or streaming files
  • Avoid relying on regex checks over raw URL paths as the sole access-control mechanism
  • Run the service with the least filesystem privileges necessary and keep sensitive files outside its readable scope
  • Use framework and platform path APIs that make canonicalization and containment checks explicit

How teams detect issues like this

Detection can combine static analysis, code review, runtime monitoring, and policy enforcement.

Useful signals include:

  • Code that joins request-derived values with filesystem paths
  • Authorization checks performed on raw URLs before framework decoding
  • Regex-based route exemptions that do not account for encoded separators or dot segments
  • File reads or streams occurring before ownership and containment checks
  • Tests covering encoded separators, dot segments, repeated decoding, and alternate path representations
  • Web application logs showing unusual encoded path components on image or cover endpoints

Automated security scanning and code-review tools may help identify request-to-filesystem data flows, but findings should be validated against the application's canonicalization and authorization order.

Sources

SourceLink
github.comgithub.com/advplyr/audiobookshelf
github.comgithub.com/advplyr/audiobookshelf/security/advisories/GHSA-pg8v-5jcv-wrvw

Frequently asked

questions

Yes, where the affected HTTP routes are reachable and configured for unauthenticated access. Exploitation does not require local shell access, although the service must be able to read the requested file.

The vulnerable route handling can allow access without authentication. Network reachability and an exposed unauthenticated cover or author-image endpoint are the key access conditions.

Canonicalize the path-derived input once, enforce containment within the intended cache directory, and perform authorization and ownership checks before opening or streaming any file.

Treat URL decoding and filesystem resolution as security boundaries, test encoded and alternate path forms, avoid user-controlled path fragments, and enforce least-privilege filesystem access for the service account.

Find out what's already
exploitable in your codebase.