CVE-2025-57800 Overview
CVE-2025-57800 is an Open Redirect vulnerability affecting Audiobookshelf, an open-source self-hosted audiobook server. The vulnerability exists in versions 2.6.0 through 2.26.3 and stems from improper restriction of redirect callback URLs during OpenID Connect (OIDC) authentication. An attacker can craft a malicious login link that causes Audiobookshelf to store an arbitrary callback URL in a cookie, which is subsequently used to redirect the user after authentication. This allows attackers to intercept sensitive OIDC tokens and achieve full account takeover.
Critical Impact
This vulnerability enables attackers to steal OIDC tokens via crafted redirect URLs, potentially leading to full account takeover including the creation of persistent admin users if the victim has administrator privileges.
Affected Products
- Audiobookshelf versions 2.6.0 through 2.26.3
- All Audiobookshelf deployments using OIDC authentication
- Self-hosted Audiobookshelf instances with OIDC configured (no IdP misconfiguration required)
Discovery Timeline
- 2025-08-22 - CVE-2025-57800 published to NVD
- 2025-08-26 - Last updated in NVD database
Technical Details for CVE-2025-57800
Vulnerability Analysis
This vulnerability represents a classic Open Redirect flaw within the OIDC authentication flow. The application fails to validate or restrict the callback URL parameter during the authentication process. When a user initiates OIDC login, Audiobookshelf stores the provided callback URL in a cookie without proper validation. After successful authentication with the identity provider, the server issues a 302 redirect to this attacker-controlled URL, appending sensitive OIDC tokens as query parameters.
The attack is particularly severe because the leaked tokens provide full authentication context. If the victim is an administrator, attackers can leverage these tokens to create persistent admin accounts, effectively establishing a backdoor into the system. Additionally, the tokens are exposed through multiple channels: browser history retains the full URL with tokens, Referer headers leak the tokens to subsequent sites visited, and server logs may capture the complete URL.
Root Cause
The root cause is the absence of proper validation for redirect callback URLs in the OIDC authentication handler. The paramsToCookies function in server/Auth.js did not verify that the callback URL pointed to a trusted destination before storing it and later using it for redirection. This violates the principle of never trusting user-supplied redirect destinations without validation against an allowlist.
Attack Vector
The attack vector is network-based and requires user interaction. An attacker crafts a specially constructed login link containing a malicious callback URL pointing to an attacker-controlled server. When a victim clicks this link and completes OIDC authentication, Audiobookshelf redirects them to the attacker's server with OIDC tokens appended as query parameters. The attacker captures these tokens and can impersonate the victim, gaining full access to their account.
The security patch addressed this vulnerability by implementing callback URL validation and adding security headers to prevent token leakage:
// Security patch in server/Server.js - Update callback url check
res.setHeader('Content-Security-Policy', "frame-ancestors 'self'")
}
+ // Security: Prevent referrer leakage to protect against token exposure
+ // Using 'no-referrer' to completely prevent token leakage in referer headers
+ res.setHeader('Referrer-Policy', 'no-referrer')
+
/**
* @temporary
* This is necessary for the ebook & cover API endpoint in the mobile apps
Source: GitHub Commit Update
Detection Methods for CVE-2025-57800
Indicators of Compromise
- Unusual OIDC authentication requests with external or non-standard callback URLs
- 302 redirect responses to unknown external domains following successful authentication
- Authentication logs showing login activity followed by immediate token usage from different IP addresses
- Unexpected creation of admin user accounts, particularly after reported phishing attempts
Detection Strategies
- Monitor authentication logs for OIDC callback URLs pointing to external domains
- Implement alerting for new admin account creation events
- Review web server logs for suspicious redirect patterns in the authentication flow
- Correlate authentication events with subsequent API calls from different geographic locations
Monitoring Recommendations
- Enable verbose logging for OIDC authentication events
- Configure SIEM rules to detect redirect responses containing tokens in query parameters
- Monitor for anomalous session activity indicating potential account takeover
- Track browser Referer header patterns that may indicate token leakage
How to Mitigate CVE-2025-57800
Immediate Actions Required
- Upgrade Audiobookshelf to version 2.28.0 or later immediately
- Audit recent OIDC authentication logs for suspicious callback URL patterns
- Review admin user accounts for unauthorized additions
- Rotate OIDC client secrets and invalidate existing sessions if compromise is suspected
Patch Information
The vulnerability is fixed in Audiobookshelf version 2.28.0. The patch implements proper validation of callback URLs and adds the Referrer-Policy: no-referrer header to prevent token leakage through Referer headers. Organizations should apply the patch by updating their Audiobookshelf installation to the latest version. The fix is available in commit 99a3867ce934b797e21e6ba5390d4b679e35f7cb. For detailed information, refer to the GitHub Security Advisory.
Workarounds
- Disable OIDC authentication temporarily until patching is complete (use local authentication only)
- Implement network-level restrictions to limit Audiobookshelf access to trusted networks
- Configure a reverse proxy to validate and restrict redirect URLs at the network edge
- Monitor and alert on any OIDC authentication events until the upgrade is complete
# Configuration example
# Upgrade Audiobookshelf to the patched version
# Using Docker (common deployment method):
docker pull ghcr.io/advplyr/audiobookshelf:2.28.0
docker stop audiobookshelf
docker rm audiobookshelf
docker run -d --name audiobookshelf \
-p 13378:80 \
-v /path/to/config:/config \
-v /path/to/audiobooks:/audiobooks \
ghcr.io/advplyr/audiobookshelf:2.28.0
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

