CVE-2025-7104

7.5 HIGH

📋 TL;DR

A mass assignment vulnerability in danny-avila/librechat allows attackers to manipulate sensitive fields by sending extra parameters in requests that get automatically bound to internal objects. This affects all versions of librechat and enables attackers to overwrite critical fields like author, access_level, and projectIds, potentially leading to privilege escalation and data manipulation.

💻 Affected Systems

Products:
  • danny-avila/librechat
Versions: All versions prior to patch
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all deployments using vulnerable versions; no special configuration required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain administrative privileges, manipulate all chat data, compromise user accounts, and potentially achieve remote code execution through prototype pollution.

🟠

Likely Case

Unauthorized users escalate privileges, modify chat data, access restricted information, and manipulate collaborative settings.

🟢

If Mitigated

Limited impact with proper input validation and access controls, but still risks data integrity issues.

🌐 Internet-Facing: HIGH - Web applications are typically internet-facing and vulnerable to automated attacks.
🏢 Internal Only: MEDIUM - Internal attackers could exploit this for privilege escalation and data manipulation.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access but is straightforward via crafted HTTP requests with extra parameters.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Commit a37bf6719cfbc2de270f7d87b6b85d87cc1768db

Vendor Advisory: https://github.com/danny-avila/librechat/commit/a37bf6719cfbc2de270f7d87b6b85d87cc1768db

Restart Required: Yes

Instructions:

1. Update to the latest version of librechat. 2. Apply commit a37bf6719cfbc2de270f7d87b6b85d87cc1768db. 3. Restart the application. 4. Verify the fix by testing mass assignment attempts.

🔧 Temporary Workarounds

Input Validation Middleware

all

Implement server-side validation to reject requests with unexpected parameters.

Implement whitelist validation for all API endpoints

Rate Limiting

all

Limit request rates to reduce automated exploitation attempts.

Configure rate limiting on API endpoints

🧯 If You Can't Patch

  • Implement strict input validation at the application layer to filter unexpected parameters.
  • Deploy a WAF (Web Application Firewall) with rules to detect and block mass assignment attempts.

🔍 How to Verify

Check if Vulnerable:

Send a POST/PUT request to any API endpoint with extra parameters (e.g., 'author' or 'access_level') and check if they are accepted and persisted.

Check Version:

Check package.json or git log for commit a37bf6719cfbc2de270f7d87b6b85d87cc1768db

Verify Fix Applied:

Attempt the same mass assignment test after patching; extra parameters should be rejected or ignored.

📡 Detection & Monitoring

Log Indicators:

  • Unusual parameter names in request logs
  • Multiple failed authorization attempts
  • Requests with unexpected field names

Network Indicators:

  • HTTP requests with excessive parameters
  • Patterns of parameter manipulation in API calls

SIEM Query:

source="web_logs" AND (parameter_count > threshold OR parameter_name IN ("author", "access_level", "isCollaborative"))

🔗 References

📤 Share & Export