CVE-2026-34371: LibreChat path traversal in execute_code artifact persistence

CVE-2026-34371 · Severity: medium · CVSS 6.3 · Published 2026-04-07

LibreChat, an open-source AI chat interface, contains a vulnerability that allows users to write files to unauthorized locations on the server. By manipulating the names of files generated during code execution tasks, an attacker can bypass security boundaries to overwrite system files or inject malicious web content. This could lead to a complete compromise of the application's frontend or persistent attacks against other users.

Technologies: LibreChat. Vendors: LibreChat.

Quick answers

Is CVE-2026-34371 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-34371 being exploited in the wild.
How severe is CVE-2026-34371?
Medium severity, with a CVSS score of 6.3, published 7 April 2026.
Which products and versions are affected?
LibreChat < 0.8.4.
Is there a fix for CVE-2026-34371?
A patch was published on 2026-04-07: Fixed in version 0.8.4 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-34371 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-34371?
Check whether you run LibreChat at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A path traversal vulnerability exists in LibreChat's handling of code-generated artifacts when using the default local file storage strategy. The application trusts the 'name' field returned by the 'execute_code' sandbox without sanitization, passing it to 'fs.writeFileSync()' via 'path.join()'. An authenticated attacker can provide a filename containing traversal sequences (e.g., '../../') to write arbitrary content to any path writable by the LibreChat server process. This can be used to overwrite frontend assets in 'client/dist' to achieve persistent XSS or write to other sensitive directories. The issue is fixed in version 0.8.4 by properly sanitizing artifact filenames.

Affected products

  • danny-avila LibreChat < 0.8.4

Timeline

  • 2026-03-13: other: Vulnerability confirmed via PoC testing
  • 2026-04-07: disclosed: Security advisory published by vendor
  • 2026-04-07: patched: Fixed in version 0.8.4

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.