Arbitrary Code Injection Affecting librechat package, versions <0.8.4-r7


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

EPSS
0.4% (32nd 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 IDSNYK-CHAINGUARDLATEST-LIBRECHAT-16776508
  • published20 May 2026
  • disclosed29 May 2026

Introduced: 20 May 2026

CVE-2026-41159  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade Chainguard librechat to version 0.8.4-r7 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.

Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.6 and 11.15.0, Mermaid's default configuration allows injecting CSS that applies outside of the Mermaid diagram via the fontFamily, themeCSS, and altFontFamily configuration options. The injected CSS exploits stylis's & (scope reference) handling. :not(&) escapes the #mermaid-xxx automatic scoping, applying styles to all page elements. Global at-rules (@font-face, @keyframes, @counter-style) are also injectable as stylis hoists them to top level. This allows page defacement and DOM attribute exfiltration via CSS :has() selectors. This vulnerability is fixed in 10.9.6 and 11.15.0.

CVSS Base Scores

version 3.1