Skip to main content

LibreChat CVE-2025-8848

MEDIUM
Code Injection (CWE-94)
2025-10-22 security@huntr.dev
5.4
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to LibreChat
  2. Exploit
    Send GET request with crafted Accept-Language header
  3. Execution
    Server reflects HTML into <html lang> attribute
  4. Impact
    Injected script executes in browser context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires an authenticated ('logged-in') LibreChat 0.7.9 session, and the HTML payload must be delivered via the Accept-Language HTTP request header on a GET request, which is reflected unescaped into the <html lang=""> attribute. The principal limiting factor is that the request header is normally attacker-self-controlled: standard browsers do not let a third party set another user's Accept-Language value, so exploitation against a different victim depends on an additional mechanism to inject or override that header (e.g., a malicious proxy, header-smuggling, or a client that honors attacker-supplied language settings). No special non-default server configuration is indicated, but authentication and reflection of the injected header into the victim's own response are mandatory.

Impact

This is a moderate-severity (CVSS 5.4), low-priority issue in practice. The CVSS vector (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N) indicates a network-reachable flaw requiring authentication (PR:L) and user interaction (UI:R), with only low confidentiality and integrity impact and a scope change reflecting the XSS crossing into the browser context. EPSS is low at 0.45% (37th percentile), and the CVE is NOT on CISA KEV, so there is no evidence of active exploitation - only publicly available exploit code (via the huntr report). A key limiting factor stands out: per the description, the attacker is a 'logged-in user' who crafts their OWN Accept-Language header to inject HTML into their own response, which makes this effectively a self-XSS unless an attacker can force a victim's browser to send a malicious Accept-Language header (not a default browser behavior). This substantially reduces real-world risk below what the raw score suggests. The input Tags list 'RCE' and 'Code Injection', but the description and resulting impact (HTML/XSS injection) do not support remote code execution - treat the RCE label as unverified. Net: a real but low-priority finding, appropriate for routine patching rather than emergency response.

Exploit ScenarioDerived

A publicly available proof-of-concept exists (huntr.com). An authenticated LibreChat user sends an HTTP GET request with a crafted Accept-Language header containing HTML markup, which is reflected unescaped into the <html lang=""> attribute of the response, allowing HTML/JavaScript injection in that user's rendered page. Because the attacker controls their own request header, meaningful cross-user impact requires an additional vector to force a victim's browser to emit the malicious header.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 08, 2026

HTML injection in LibreChat 0.7.9 allows an authenticated user to reflect arbitrary markup into the <html lang=""> attribute of a server response by sending a crafted Accept-Language header on an HTTP GET request, which can be escalated into cross-site scripting (XSS) in the browser session that renders the injected page. Publicly available exploit code exists and the issue is documented through a Huntr bounty, but EPSS is only 0.45% (37th percentile) and CVSS 3.1 scores it 5.4 (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N), which our review confirms as a moderate-severity, low-priority issue in practice. The principal limiting factor is that Accept-Language is normally chosen by the requester, so hitting a different victim requires an additional mechanism to set or override that header, such as a malicious proxy, header smuggling, or a client that honors attacker-supplied language preferences.

RemediationAI

No vendor-released patch or fixed version is identified in the available data for CVE-2025-8848, so the primary fix is to correct the missing output encoding in the application: HTML-escape the Accept-Language value - or better, validate it against a strict BCP-47 language-tag allowlist - before it is written into the <html lang=""> attribute, which removes the injection vector while preserving legitimate localization, and is a small, low-risk change if the codebase is under your control. Until an upstream fix is adopted, viable compensating controls are deploying a Content-Security-Policy that disallows inline script, which blocks the XSS escalation but can break parts of the UI that rely on inline handlers; rewriting or stripping non-conforming Accept-Language headers at a reverse proxy or WAF so only well-formed language tokens reach the application, with the side effect that unusual or malformed locale requests may be dropped or fall back to a default language; and restricting access to the instance to trusted users or networks where the deployment permits. Track the Huntr report at https://huntr.com/bounties/a05ebc1f-882a-4adc-b178-d3cefa4b730e and the project repository for an upstream fix; because the header is normally set by the requester, self-XSS-style impact is the common case and the residual organizational risk is low (EPSS 0.45%).

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The defect is a server-side output-encoding failure: LibreChat 0.7.9 reads the client-supplied Accept-Language request header and interpolates its value directly into the lang attribute of the root <html> element of the rendered page, so delimiter and tag characters (quotes, angle brackets) are never neutralized. It is classified under CWE-94 (Improper Control of Generation of Code, i.e. code injection), the root-cause class covering cases where attacker-influenced data reaches a code or markup generation context - here the generation context is HTML markup rather than a scripting engine, which is why the practical outcome is HTML injection that can become XSS when the injected markup executes in a victim's browser. The affected artifact is the LibreChat web application from the danny-avila/librechat project, with the CPE record cpe:2.3:a:librechat:librechat:0.7.9:-:*:*:*:*:*:* pinning the exposed version to 0.7.9. The behavior is grounded in HTTP content-negotiation semantics: Accept-Language is a standard client-set header, and browser same-origin rules do not permit a third party to choose another user's value, which is the structural reason the assessed impact stops at moderate severity rather than an unauthenticated, remotely reachable flaw; the CVSS vector's PR:L and UI:R reflect the mandatory authenticated session and the need for a victim to load the crafted response.

Know when Librechat gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

Network-reachable but requires an authenticated session (PR:L) and the header-carrying request/render (UI:R); reflected XSS crosses into the browser context (S:C) with low C/I and no availability impact.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionNVD

A vulnerability in danny-avila/librechat version 0.7.9 allows for HTML injection via the Accept-Language header. When a logged-in user sends an HTTP GET request with a crafted Accept-Language header, arbitrary HTML can be injected into the <html lang=""> tag of the response. This can lead to potential security risks such as cross-site scripting (XSS) attacks.

Threat Intelligence Overview

EPSS Score
0.5%
Top 63% exploitable
Prevalence
Low
self-hosted open-source AI chat app, limited production footprint
Exploit
POC
Public exploit code exists
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Affected Products (CPE)NVD

cpe:2.3:a:librechat:librechat:0.7.9:-:*:*:*:*:*:*
CVE-2024-11170 HIGH POC
8.8 Mar 20

A vulnerability in danny-avila/librechat version git 81f2936 allows for path traversal due to improper sanitization of f

CVE-2024-10361 CRITICAL POC
9.1 Mar 20

An arbitrary file deletion vulnerability exists in danny-avila/librechat version v0.7.5-rc2, specifically within the /ap

CVE-2026-22252 CRITICAL POC
9.1 Jan 12

LibreChat before v0.8.2-rc2 allows any authenticated user to execute shell commands as root inside the container through

CVE-2025-8850 HIGH POC
8.8 Oct 30

LibreChat 0.7.9 lets an authenticated user turn off two-factor authentication on their own account without supplying a v

CVE-2025-66450 HIGH POC
8.6 Dec 11

Stored cross-site scripting and tracker injection in LibreChat 0.8.0 and earlier allow a user who can create a chat to c

CVE-2025-66201 HIGH POC
8.6 Nov 29

LibreChat is a ChatGPT clone with additional features. Rated high severity (CVSS 8.6), this vulnerability is remotely ex

CVE-2025-69222 HIGH POC
8.1 Jan 07

LibreChat 0.8.1-rc2 has SSRF in the Actions feature that allows authenticated users to make the server perform requests

CVE-2024-11171 HIGH POC
7.5 Mar 20

In danny-avila/librechat version git 0c2a583, there is an improper input validation vulnerability. Rated high severity (

CVE-2025-7104 HIGH POC
7.5 Sep 29

A mass assignment vulnerability exists in danny-avila/librechat, affecting all versions. Rated high severity (CVSS 7.5),

CVE-2025-8849 HIGH POC
7.5 Oct 31

Unbounded `key` and `value` parameters on the LibreChat 0.7.9 memory API (`POST /api/memories` and `PATCH /api/memories/

CVE-2024-11173 MEDIUM POC
6.5 Mar 20

An unhandled exception in the danny-avila/librechat repository, version git 600d217, can cause the server to crash, lead

CVE-2024-10366 MEDIUM POC
6.5 Mar 20

An improper access control vulnerability (IDOR) exists in the delete attachments functionality of danny-avila/librechat

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy