Cross-site Scripting (XSS) Affecting librechat package, versions <0.8.3-r0


Severity

Recommended
0.0
medium
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.01% (2nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Scripting (XSS) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CHAINGUARDLATEST-LIBRECHAT-15449956
  • published11 Mar 2026
  • disclosed3 Mar 2026

Introduced: 3 Mar 2026

NewCVE-2026-0540  (opens in a new tab)
CWE-79  (opens in a new tab)

How to fix?

Upgrade Chainguard librechat to version 0.8.3-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream librechat package and not the librechat package as distributed by Chainguard. See How to fix? for Chainguard relevant fixed versions and status.

DOMPurify 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8, fixed in commit 2726c74, contain a cross-site scripting vulnerability that allows attackers to bypass attribute sanitization by exploiting five missing rawtext elements (noscript, xmp, noembed, noframes, iframe) in the SAFE_FOR_XML regex. Attackers can include payloads like </noscript><img src=x onerror=alert(1)> in attribute values to execute JavaScript when sanitized output is placed inside these unprotected rawtext contexts.

CVSS Base Scores

version 3.1