☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-7106

CVE-2025-7106 Improper Access Control in Librechat
📅 PUBLISHED: 2025-09-23 09:54 UTC 🔄 UPDATED: 2026-09-23 20:32 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.28%
👁️
0.28% probability
6.9× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-7106 is an authorization bypass vulnerability in the LibreChat application, specifically within the checkAccess function in api/server/middleware/roles/access.js. The flaw arises from improper use of permissions.some() to validate multiple required permissions. This allows a user with the USER role, who has USE: true but CREATE: false, to still create agents because the check for ['USE', 'CREATE'] passes with only USE: true. The vulnerability affects all versions prior to the fix and also impacts other permission checks, such as PROMPTS. The CVSS score is 5.3 (Medium), and no public exploit or patch details are currently available.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

LibreChat is a Node.js application distributed via GitHub and npm. The vulnerability is in the application's own middleware code, not in a third-party package. However, the risk of supply chain compromise is elevated if the application is deployed via container images or CI/CD pipelines that pull from untrusted sources. Organizations should verify the integrity of their LibreChat installations and ensure they are running a version that includes the fix.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) - The vulnerability can be exploited remotely.
  • Attack Complexity (AC): Low (L) - No special conditions are required.
  • Privileges Required (PR): Low (L) - An attacker needs a valid user account with the USER role.
  • User Interaction (UI): None (N) - No user interaction is required.
  • Scope (S): Unchanged (U) - The exploit does not affect other components.
  • Confidentiality (C): Low (L) - Limited information disclosure (e.g., ability to create agents).
  • Integrity (I): Low (L) - Limited ability to modify data (e.g., creating unauthorized agents).
  • Availability (A): None (N) - No impact on availability.

Threat Level: Medium. The vulnerability requires authentication but allows privilege escalation from a standard user to perform actions reserved for higher-privileged roles.

Deep Dive & Mechanics

The vulnerability is in the checkAccess function located in api/server/middleware/roles/access.js. The function is designed to verify that a user has all required permissions for a given action. However, it uses permissions.some() instead of permissions.every().

Vulnerable Code Logic:

// Vulnerable implementation
function checkAccess(userPermissions, requiredPermissions) {
  return requiredPermissions.some(perm => userPermissions[perm] === true);
}

This logic returns true if any of the required permissions is present. For example, if the required permissions are ['USE', 'CREATE'] and the user has USE: true but CREATE: false, the function returns true, granting access incorrectly.

Impact:

  • A user with the USER role (which typically has USE: true but CREATE: false) can create agents.
  • The same flaw affects other permission checks, such as PROMPTS, potentially allowing unauthorized access to other features.

Vulnerable vs. Patched Code

Vulnerable Code (pre-fix):

// api/server/middleware/roles/access.js
function checkAccess(userPermissions, requiredPermissions) {
  return requiredPermissions.some(perm => userPermissions[perm] === true);
}

Patched Code (post-fix):

// api/server/middleware/roles/access.js
function checkAccess(userPermissions, requiredPermissions) {
  return requiredPermissions.every(perm => userPermissions[perm] === true);
}

The fix changes some() to every(), ensuring that all required permissions must be present for access to be granted.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • A valid user account with the USER role on a vulnerable LibreChat instance.
  • Network access to the LibreChat API.

Exploitation Steps:

  1. Authenticate as a USER role user and obtain a session token.
  2. Send a POST request to the agent creation endpoint (e.g., /api/agents) with the required payload.
  3. Observe that the agent is created successfully, bypassing the CREATE: false permission.

Example Request:

curl -X POST https://target.com/api/agents \
  -H "Authorization: Bearer <USER_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"name": "malicious-agent", "description": "Created via bypass"}'

Expected Result: The agent is created, confirming the authorization bypass.

Blue Team (Detection & Prevention)

Detection:

  • Monitor API logs for unauthorized agent creation by users with the USER role.
  • Alert on any POST /api/agents requests from users whose role is not ADMIN or CREATOR.

Prevention:

  • Apply the patch by changing some() to every() in the checkAccess function.
  • Implement additional validation at the service layer to double-check permissions.
  • Conduct a full audit of all permission checks in the application.

Indicators of Compromise (IOCs)

  • Log Entries: Successful POST /api/agents requests from users with the USER role.
  • Network Traffic: Unusual API calls to agent creation endpoints from low-privileged users.
  • System State: Presence of agents created by users who should not have the CREATE permission.

Detection Engineering

YARA Rule

rule CVE_2025_7106_LibreChat_AuthBypass {
    meta:
        description = "Detects vulnerable checkAccess function in LibreChat"
        author = "Valters IT"
        date = "2025-07-01"
        reference = "CVE-2025-7106"
    strings:
        $vuln_code = "requiredPermissions.some(perm => userPermissions[perm] === true)"
    condition:
        $vuln_code
}

Sigma Rule

title: CVE-2025-7106 - LibreChat Authorization Bypass
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects unauthorized agent creation by users with USER role
author: Valters IT
date: 2025/07/01
logsource:
    category: application
    product: librechat
detection:
    selection:
        http.method: POST
        http.url.path: /api/agents
        user.role: USER
    condition: selection
falsepositives:
    - Legitimate admin actions if role mapping is incorrect
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2025-7106 - LibreChat Authorization Bypass Attempt";
    flow:to_server,established;
    http.method; content:"POST";
    http.uri; content:"/api/agents";
    http.user_agent; content:"curl|20|librechat|20|exploit";
    classtype:attempted-admin;
    sid:1000001;
    rev:1;
)

Remediation & Mitigation

Immediate Actions:

  1. Apply the patch by updating the checkAccess function to use every() instead of some().
  2. If a patch is not available, manually edit the file api/server/middleware/roles/access.js and replace some with every.
  3. Restart the LibreChat service after applying the change.

Long-Term Mitigations:

  • Implement a comprehensive permission validation framework that uses every() for all multi-permission checks.
  • Conduct regular code reviews focusing on authorization logic.
  • Deploy Web Application Firewall (WAF) rules to block suspicious API calls.
  • Monitor for any unauthorized access attempts and review user activity logs.

Workaround:

  • Temporarily disable the agent creation feature for USER role users by modifying the role configuration in the database.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-7106/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.