CVE-2026-34371: LibreChat Affected by Arbitrary File Write via `execute_code` Artifact Filename Traversal
LibreChat is a ChatGPT clone with additional features. Prior to 0.8.4, LibreChat trusts the name field returned by the executecode sandbox when persisting code-generated artifacts. On deployments using the default local file strategy, a malicious artifact filename containing traversal sequences (for example, ../../../../../app/client/dist/poc.txt) is concatenated into the server-side destination path and written with fs.writeFileSync() without sanitization. This gives any user who can trigger executecode an arbitrary file write primitive as the LibreChat server user. This vulnerability is fixed in 0.8.4.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
LibreChatto a version that resolves this vulnerability.Fixed in 0.8.4
Event History
Frequently Asked Questions
What is the severity of CVE-2026-34371?
CVE-2026-34371 is considered to have a high severity due to the potential for arbitrary file write vulnerabilities in LibreChat.
How do I fix CVE-2026-34371?
To mitigate CVE-2026-34371, upgrade LibreChat to version 0.8.4 or later where the vulnerability has been addressed.
What are the potential impacts of CVE-2026-34371?
The potential impacts of CVE-2026-34371 include unauthorized access to sensitive file systems and possible execution of malicious code.
Which versions of LibreChat are affected by CVE-2026-34371?
CVE-2026-34371 affects all versions of LibreChat prior to 0.8.4.
How does CVE-2026-34371 allow for arbitrary file write?
CVE-2026-34371 exploits a filename traversal vulnerability in the execute_code function, allowing attackers to manipulate file paths.