Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-25205

CVE-2025-25205: Audiobookshelf Auth Bypass Vulnerability

CVE-2025-25205 is an authentication bypass flaw in Audiobookshelf that allows attackers to craft URLs bypassing authentication checks, leading to information disclosure or server crashes. This article covers technical details, affected versions, impact, and mitigation strategies.

Updated:

CVE-2025-25205 Overview

Audiobookshelf is a self-hosted audiobook and podcast server. A flaw in its authentication bypass logic allows unauthenticated requests to match unanchored regex patterns within URLs. Attackers can craft URLs containing substrings such as /api/items/1/cover inside a query parameter (for example, ?r=/api/items/1/cover) to partially bypass authentication or crash the server on certain routes.

The vulnerability affects versions 2.17.0 through 2.19.0. Version 2.19.1 contains the patch. The issue is tracked under [CWE-202] and carries a CVSS 3.1 base score of 8.2.

Critical Impact

Unauthenticated attackers can disclose protected data and crash the Audiobookshelf server through crafted query parameters, leading to information leakage and denial of service.

Affected Products

  • Audiobookshelf versions 2.17.0 through 2.19.0
  • Self-hosted Audiobookshelf instances exposed to untrusted networks
  • Deployments running the vulnerable server/Auth.js authentication logic

Discovery Timeline

  • 2025-02-12 - CVE-2025-25205 published to NVD
  • 2025-07-03 - Last updated in NVD database

Technical Details for CVE-2025-25205

Vulnerability Analysis

The vulnerability is an authentication bypass caused by improper regex anchoring in the Audiobookshelf authentication middleware. The middleware compares incoming request URLs against a list of regex patterns that identify routes permitted without authentication, such as the cover image endpoint. Because the patterns are not anchored to the start and end of the URL, any URL containing a matching substring is treated as public.

An attacker submitting a request like /api/protected/resource?r=/api/items/1/cover causes the regex engine to match the public substring inside the query string. The request then bypasses authentication checks and reaches downstream handlers. When those handlers expect an authenticated user object, the missing context triggers an unhandled exception that crashes the Node.js process, producing a denial of service.

Root Cause

The root cause is the use of unanchored regular expressions inside the authentication allow-list logic in server/Auth.js. URL pattern matching that lacks ^ and $ anchors permits attacker-controlled segments of the URL to satisfy the bypass condition. See the GitHub Security Advisory GHSA-pg8v-5jcv-wrvw and the relevant authentication logic in Auth.js.

Attack Vector

The vulnerability is exploited over the network without authentication or user interaction. An attacker sends a single HTTP request to a vulnerable Audiobookshelf instance, embedding the bypass substring inside a query parameter, path segment, or other URL component evaluated by the regex. Depending on the route accessed, the result is partial disclosure of protected data or a server crash that disrupts service availability.

No verified proof-of-concept code is publicly available. Technical exploitation details can be reviewed in the upstream pull request 3584 and the patch commits bf840727 and ec653765.

Detection Methods for CVE-2025-25205

Indicators of Compromise

  • HTTP requests containing public route substrings inside query parameters, such as ?r=/api/items/, ?path=/api/items/, or similar reflective parameters.
  • Unauthenticated successful responses to endpoints normally requiring a session token or API key.
  • Repeated Node.js process restarts or crash logs referencing undefined user objects in Audiobookshelf request handlers.

Detection Strategies

  • Review reverse proxy and web server access logs for anomalous query strings that include API path fragments.
  • Correlate spikes in 5xx responses and process restarts with inbound requests carrying suspicious URL parameters.
  • Compare authentication audit logs against successful API responses to identify requests served without a valid session.

Monitoring Recommendations

  • Enable verbose access logging on the application or its fronting reverse proxy and forward logs to a centralized analytics platform.
  • Alert on Audiobookshelf service availability metrics and unexpected restarts of the Node.js process.
  • Track outbound responses containing protected metadata returned to clients lacking authentication headers.

How to Mitigate CVE-2025-25205

Immediate Actions Required

  • Upgrade Audiobookshelf to version 2.19.1 or later, which contains the patch for the authentication bypass.
  • Restrict network exposure of Audiobookshelf instances to trusted networks or place the service behind a VPN until patched.
  • Review server and reverse proxy logs for prior exploitation attempts using crafted query parameters.

Patch Information

The issue is resolved in Audiobookshelf 2.19.1. The fix anchors the authentication bypass regex patterns and revalidates request URLs against the allow-list. Refer to commits bf840727 and ec653765 and the GHSA-pg8v-5jcv-wrvw advisory for full remediation details.

Workarounds

  • Place Audiobookshelf behind an authenticating reverse proxy that enforces session validation before forwarding requests.
  • Configure web application firewall rules to drop requests containing API path substrings inside query parameters.
  • Limit inbound access to the Audiobookshelf service to authenticated VPN clients until the upgrade is applied.
bash
# Example WAF rule (ModSecurity) blocking bypass patterns in query strings
SecRule ARGS "@rx /api/(items|users|libraries)/[^/]+/(cover|stream)" \
    "id:1002025,phase:1,deny,status:403,log,\
    msg:'Audiobookshelf CVE-2025-25205 auth bypass attempt'"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.