Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-34371

CVE-2026-34371: LibreChat Path Traversal Vulnerability

CVE-2026-34371 is a path traversal flaw in LibreChat that allows attackers to write arbitrary files via malicious artifact filenames. This post covers the technical details, affected versions, impact, and mitigation.

Published: April 10, 2026

CVE-2026-34371 Overview

A path traversal vulnerability has been identified in LibreChat, a popular open-source ChatGPT clone with additional features. Prior to version 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.

Critical Impact

Authenticated attackers can write arbitrary files to the server filesystem, potentially enabling remote code execution, configuration tampering, or service disruption.

Affected Products

  • LibreChat versions prior to 0.8.4
  • Deployments using the default local file storage strategy
  • Instances with execute_code functionality enabled

Discovery Timeline

  • 2026-04-07 - CVE CVE-2026-34371 published to NVD
  • 2026-04-08 - Last updated in NVD database

Technical Details for CVE-2026-34371

Vulnerability Analysis

This vulnerability is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), commonly known as Path Traversal. The core issue stems from LibreChat's implicit trust of user-controlled input when handling artifact filenames returned from the code execution sandbox.

When users execute code through LibreChat's sandbox environment, the application persists resulting artifacts to the local filesystem. The vulnerability occurs because the application directly concatenates the artifact's name field into the destination path without proper validation or sanitization. This design flaw allows malicious path traversal sequences such as ../ to escape the intended storage directory and write files to arbitrary locations on the server filesystem.

The attack requires network access and user authentication (low privileges), but exploitation has high complexity due to the specific conditions required. The impact is limited to integrity concerns, as the vulnerability enables arbitrary file writes but does not directly expose confidential data or cause system availability issues.

Root Cause

The root cause is insufficient input validation in the artifact persistence logic. When the execute_code sandbox returns an artifact with a user-controlled filename, LibreChat's server-side code directly uses this value in the file path construction without sanitizing directory traversal sequences. The fs.writeFileSync() function then writes the artifact content to whatever path results from this concatenation, enabling attackers to escape the intended artifact storage directory.

Attack Vector

The attack is network-based and requires an authenticated user with access to the code execution functionality. An attacker crafts a malicious artifact filename containing path traversal sequences that, when processed by the server, resolve to a location outside the intended storage directory.

The vulnerability mechanism works as follows: when code execution produces an artifact, the sandbox returns metadata including a name field. LibreChat's artifact handling code takes this name and appends it to the base storage path. Without sanitization, a name like ../../../../../app/client/dist/malicious.js would cause the server to write the artifact content to the application's client distribution directory, potentially overwriting legitimate application files or injecting malicious content.

For detailed technical information, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-34371

Indicators of Compromise

  • File system anomalies showing new or modified files in unexpected directories outside the artifact storage path
  • Web server logs indicating code execution requests with unusual artifact names containing ../ sequences
  • Unexpected files appearing in the LibreChat client distribution directory (/app/client/dist/)
  • Modified application configuration files or server-side scripts

Detection Strategies

  • Implement file integrity monitoring (FIM) on critical LibreChat directories to detect unauthorized file modifications
  • Configure application-level logging to capture artifact names during code execution and alert on path traversal patterns
  • Deploy web application firewall (WAF) rules to detect and block requests containing path traversal sequences in artifact-related parameters
  • Review server logs for patterns of ../ in code execution request payloads

Monitoring Recommendations

  • Enable verbose logging for the LibreChat artifact storage subsystem to capture filename operations
  • Monitor the filesystem for write operations occurring outside designated artifact storage directories
  • Set up alerts for any modifications to application source code or configuration files on the LibreChat server
  • Implement behavioral analysis to detect authenticated users attempting multiple code executions with unusual artifact names

How to Mitigate CVE-2026-34371

Immediate Actions Required

  • Upgrade LibreChat to version 0.8.4 or later immediately
  • Review file systems for any unexpected files that may indicate prior exploitation
  • Audit artifact storage directories for files with suspicious names or content
  • Consider temporarily disabling the execute_code functionality until patching is complete

Patch Information

The vulnerability has been fixed in LibreChat version 0.8.4. The patch implements proper sanitization of artifact filenames before they are used in file path construction, preventing directory traversal attacks. Organizations should upgrade to 0.8.4 or later to remediate this vulnerability. For additional details, consult the GitHub Security Advisory.

Workarounds

  • Switch from the default local file storage strategy to a cloud-based storage backend that does not rely on local filesystem paths
  • Implement filesystem-level access controls to restrict the LibreChat process from writing outside designated directories
  • Deploy the application in a containerized environment with read-only filesystem mounts for critical directories
  • Use AppArmor or SELinux profiles to restrict file write operations to the intended artifact storage location
bash
# Example: Restrict LibreChat write permissions using filesystem permissions
# Ensure the artifact storage directory is the only writable location

# Create restricted artifact directory
mkdir -p /var/lib/librechat/artifacts
chown librechat:librechat /var/lib/librechat/artifacts
chmod 755 /var/lib/librechat/artifacts

# Make application directories read-only for the service user
chmod 555 /app/client/dist
chattr +i /app/client/dist/*.js

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechLibrechat

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-31943: LibreChat SSRF Vulnerability

  • CVE-2026-31945: Librechat SSRF Vulnerability

  • CVE-2026-31950: LibreChat Auth Bypass Vulnerability

  • CVE-2026-31951: LibreChat Information Disclosure Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English