CVE-2025-41258 Details
Description
LibreChat version 0.8.1-rc2 uses the same JWT secret for the user session mechanism and RAG API which compromises the service-level authentication of the RAG API.
A vulnerability in LibreChat version 0.8.1-rc2 allows for authentication bypass on the RAG API. This issue arises because the same JSON Web Token (JWT) secret is used for both user session management and RAG API authentication. As a result, an authenticated user can exploit their session token to access RAG API endpoints, bypassing intended access controls. This vulnerability is particularly concerning because the RAG API is typically only accessible internally, requiring either internal network access or the exploitation of another vulnerability to reach it.
It is recommended to use a separate JWT secret for the RAG API authentication and to add audience claims to the JWT tokens, validating them in both LibreChat and the RAG API. This would prevent the reuse of tokens even when the JWT secret is the same. Additionally, using separate environment files for each service in the Docker Compose setup can help manage secrets more effectively.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 18, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/danny-avila/LibreChat | sba-research | Product |
| https://github.com/sbaresearch/advisories/tree/public/2025/SBA-ADV-20251205-01_LibreChat_RAG_API_Authentication_Bypass | sba-research | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-284 | Improper Access Control | sba-research |
Affected Products
| Product | Versions |
|---|---|
| librechat librechat | 0.8.1 rc2 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | sba-research |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 24, 2026 | Initial Analysis | [email protected] |
| Mar 18, 2026 | New CVE Received | sba-research |