The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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-32146

CVE-2026-32146: Gleam Compiler Path Traversal Vulnerability

CVE-2026-32146 is a path traversal vulnerability in the Gleam compiler that allows arbitrary file system modification during git dependency downloads. This article covers the technical details, affected versions, impact, and mitigation.

Published: April 17, 2026

CVE-2026-32146 Overview

An improper path validation vulnerability exists in the Gleam compiler's handling of git dependencies that allows arbitrary file system modification during dependency download. Dependency names from gleam.toml and manifest.toml are incorporated into filesystem paths without sufficient validation or confinement to the intended dependency directory, enabling attacker-controlled paths via relative traversal (such as ../) or absolute paths to target filesystem locations outside the designated directory.

When resolving git dependencies (e.g., via gleam deps download), the computed path is used for filesystem operations including directory deletion and creation. A malicious direct or transitive git dependency can exploit this issue to delete and overwrite arbitrary directories outside the intended dependency directory, including attacker-chosen absolute paths, potentially causing data loss. In some environments, this may be further leveraged to achieve code execution by overwriting git hooks or shell configuration files.

Critical Impact

Attackers can exploit improper path validation to perform arbitrary file system operations outside the dependency directory, potentially leading to data loss or code execution through malicious git dependencies.

Affected Products

  • Gleam compiler versions 1.9.0-rc1 through 1.15.3 (fixed in 1.15.4)

Discovery Timeline

  • 2026-04-11 - CVE-2026-32146 published to NVD
  • 2026-04-14 - Last updated in NVD database

Technical Details for CVE-2026-32146

Vulnerability Analysis

This vulnerability is classified as CWE-22 (Path Traversal) and affects the Gleam compiler's dependency resolution mechanism. The core issue lies in how the compiler processes dependency names from configuration files (gleam.toml and manifest.toml) without proper path validation.

During the dependency download phase, the Gleam compiler constructs filesystem paths by directly incorporating dependency names from configuration files. The compiler expects dependencies to be stored within a confined directory structure. However, the absence of proper validation allows malicious package names containing path traversal sequences (such as ../) or absolute paths to escape the intended directory boundary.

The attack surface is particularly concerning because:

  1. Transitive dependency exploitation: A seemingly legitimate package could include a malicious transitive dependency, making detection more difficult
  2. Pre-execution timing: The vulnerability triggers during dependency resolution, before any code execution safeguards would apply
  3. Destructive operations: The affected code path performs both directory deletion and creation, enabling complete replacement of targeted directories

Root Cause

The root cause is insufficient input validation on dependency names during configuration file parsing. The Gleam compiler's config.rs module originally lacked proper deserialization validation for dependency names in both the dependencies and dev_dependencies fields. Without validation constraints, arbitrary strings including path traversal sequences were accepted as valid dependency names and subsequently used in filesystem path construction.

Attack Vector

This is a local attack vector requiring user interaction. An attacker must either convince a victim to add a malicious dependency to their project directly or inject a malicious transitive dependency through a compromised package. When the victim runs gleam deps download or any command that triggers dependency resolution, the malicious dependency name is processed, allowing the attacker to:

  1. Delete arbitrary directories accessible by the user running the compiler
  2. Create directories at attacker-controlled locations
  3. Potentially achieve code execution by overwriting sensitive files such as .git/hooks/ or shell configuration files like .bashrc

The following patch demonstrates the fix implemented in compiler-core/src/config.rs to add proper deserialization validation for dependency names:

rust
     pub description: EcoString,
     #[serde(default, alias = "docs")]
     pub documentation: Docs,
-    #[serde(default, serialize_with = "ordered_map")]
+    #[serde(
+        default,
+        serialize_with = "ordered_map",
+        deserialize_with = "dependencies_map::deserialize"
+    )]
     pub dependencies: Dependencies,
-    #[serde(default, alias = "dev-dependencies", serialize_with = "ordered_map")]
+    #[serde(
+        default,
+        alias = "dev-dependencies",
+        serialize_with = "ordered_map",
+        deserialize_with = "dependencies_map::deserialize"
+    )]
     pub dev_dependencies: Dependencies,
     #[serde(default)]
     pub repository: Option<Repository>,

Source: GitHub Commit 1aa5d8e

The corresponding fix for manifest validation in compiler-core/src/manifest.rs:

rust
 #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq)]
 pub struct Manifest {
-    #[serde(serialize_with = "ordered_map")]
+    #[serde(
+        serialize_with = "ordered_map",
+        deserialize_with = "super::config::dependencies_map::deserialize"
+    )]
     pub requirements: HashMap<EcoString, Requirement>,
     #[serde(serialize_with = "sorted_vec")]
     pub packages: Vec<ManifestPackage>,

Source: GitHub Commit 2dc0467

Detection Methods for CVE-2026-32146

Indicators of Compromise

  • Unexpected directory deletions or modifications outside the project's build/ or dependency directories
  • Presence of dependency names containing ../, absolute paths, or characters outside the expected pattern (lowercase letters, numbers, underscores) in gleam.toml or manifest.toml
  • Modifications to sensitive files such as git hooks, shell configuration files, or other user-writable system files following Gleam dependency operations
  • Unusual file system activity during gleam deps download or gleam build commands

Detection Strategies

  • Implement file integrity monitoring on critical user directories (.git/hooks/, home directory configuration files)
  • Audit gleam.toml and manifest.toml files for dependency names containing path traversal characters or invalid patterns
  • Monitor filesystem operations during Gleam build processes for writes outside expected directories
  • Review transitive dependencies for suspicious naming patterns before adding new packages to projects

Monitoring Recommendations

  • Configure SentinelOne to alert on unexpected file modifications in user home directories during build tool execution
  • Enable logging for filesystem operations performed by the Gleam compiler process
  • Implement CI/CD pipeline checks to validate dependency names against expected patterns before builds

How to Mitigate CVE-2026-32146

Immediate Actions Required

  • Upgrade Gleam compiler to version 1.15.4 or later immediately
  • Audit existing projects' gleam.toml and manifest.toml files for any suspicious dependency names
  • Review any unexpected file system changes that may have occurred prior to patching
  • Consider temporarily disabling automated dependency updates until the patched version is deployed

Patch Information

The vulnerability has been addressed in Gleam version 1.15.4. The fix introduces proper validation during configuration file parsing through custom deserializers that enforce package name constraints (lowercase letters, numbers, and underscores only). Two commits address this issue:

  • Commit 1aa5d8e - Adds validation during gleam.toml parsing to error immediately on invalid dependency names
  • Commit 2dc0467 - Extends validation to manifest.toml parsing

For additional details, refer to the GitHub Security Advisory GHSA-vq5j-55vx-wq8j.

Workarounds

  • Manually audit all dependency names in gleam.toml and manifest.toml before running dependency commands
  • Only add dependencies from trusted sources with verified naming conventions
  • Run Gleam dependency operations in isolated environments (containers, sandboxes) to limit potential damage from exploitation
  • Implement pre-commit hooks to validate dependency names match the expected pattern of lowercase letters, numbers, and underscores only
bash
# Example: Validate dependency names in gleam.toml before running build
# Check for path traversal sequences or invalid characters
grep -E '\.\./|/|[^a-z0-9_]' gleam.toml | grep -E '^\[?dependencies' && echo "WARNING: Potentially malicious dependency names detected"

# Run Gleam builds in a container to isolate filesystem access
docker run --rm -v $(pwd):/app -w /app gleam-lang/gleam:latest deps download

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechGleam

  • SeverityHIGH

  • CVSS Score8.3

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Technical References
  • CNA CVE-2026-32146

  • GitHub Commit Update 1aa5d8e

  • GitHub Commit Update 2dc0467

  • GitHub Security Advisory GHSA-vq5j-55vx-wq8j

  • OSV Vulnerability EEF-CVE-2026-32146
  • Latest CVEs
  • CVE-2025-52479: HTTP.jl & URIs.jl CRLF Injection Flaw

  • CVE-2026-31740: Linux Kernel Race Condition Vulnerability

  • CVE-2026-31743: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31744: Linux Kernel NULL Pointer Vulnerability
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