CVE-2026-34371
JSON

6.3medium

LibreChat Affected by Arbitrary File Write via `execute_code` Artifact Filename Traversal

Severity
6.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.27% (higher than 21% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

LibreChat is a ChatGPT clone with additional features. Prior to 0.8.4, LibreChat trusts the name field returned by the execute_code 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 execute_code an arbitrary file write primitive as the LibreChat server user. This vulnerability is fixed in 0.8.4.

Affected

Product or packageVersionsReported by
danny-avila LibreChat< 0.8.4CVE List
librechat librechatbefore 0.8.4NVD

Classification

CWE-22

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

LibreChat is a ChatGPT clone with additional features. Prior to 0.8.4, LibreChat trusts the name field returned by the execute_code 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 execute_code an arbitrary file write primitive as the LibreChat server user. This vulnerability is fixed in 0.8.4.

NVD (es)

LibreChat es un clon de ChatGPT con características adicionales. Antes de la versión 0.8.4, LibreChat confía en el campo de nombre devuelto por el sandbox de execute_code al persistir artefactos generados por código. En implementaciones que utilizan la estrategia predeterminada de archivo local, un nombre de archivo de artefacto malicioso que contiene secuencias de recorrido (por ejemplo, '.. / ../.. / ../../app/client/dist/poc.txt') se concatena en la ruta de destino del lado del servidor y se escribe con fs.writeFileSync() sin sanitización. Esto otorga a cualquier usuario que puede activar execute_code una primitiva de escritura de archivo arbitraria como el usuario del servidor de LibreChat. Esta vulnerabilidad se corrige en la versión 0.8.4.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-34371 changed 2026-04-08CVE Terms of Use
NVDCVE-2026-34371 changed 2026-07-24Public domain