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
    • 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-2025-62725

CVE-2025-62725: Docker Compose Path Traversal Vulnerability

CVE-2025-62725 is a path traversal vulnerability in Docker Compose that allows attackers to overwrite arbitrary files via malicious OCI artifacts. This article covers technical details, affected systems, and mitigation.

Published: March 11, 2026

CVE-2025-62725 Overview

CVE-2025-62725 is a Path Traversal vulnerability affecting Docker Compose's handling of remote OCI compose artifacts. The vulnerability exists because Docker Compose improperly trusts path information embedded in remote OCI compose artifacts. When a layer includes the annotations com.docker.compose.extends or com.docker.compose.envfile, Compose joins the attacker-supplied value from com.docker.compose.file or com.docker.compose.envfile with its local cache directory and writes the file there without proper validation.

This vulnerability enables an attacker to escape the cache directory and overwrite arbitrary files on the machine running docker compose, even when users only execute read-only commands such as docker compose config or docker compose ps. The vulnerability is classified as CWE-22 (Path Traversal).

Critical Impact

An attacker can overwrite arbitrary files on systems that resolve remote OCI compose artifacts, affecting Docker Desktop, standalone Compose binaries on Linux, CI/CD runners, and cloud development environments.

Affected Products

  • Docker Compose versions prior to v2.40.2
  • Docker Desktop (all platforms using vulnerable Compose versions)
  • Standalone Compose binaries on Linux

Discovery Timeline

  • 2025-10-27 - CVE CVE-2025-62725 published to NVD
  • 2025-10-30 - Last updated in NVD database

Technical Details for CVE-2025-62725

Vulnerability Analysis

This Path Traversal vulnerability stems from Docker Compose's improper handling of path annotations in OCI artifacts. The vulnerable code blindly trusts the com.docker.compose.file and com.docker.compose.envfile annotation values provided by remote OCI artifacts. When processing these annotations, Compose joins these attacker-controlled values with its local cache directory path without validating that the resulting path remains within the intended cache directory boundaries.

The security implications are severe because exploitation can occur through seemingly innocuous read-only commands. A user who merely runs docker compose config or docker compose ps against a malicious OCI artifact can have arbitrary files overwritten on their system. This affects a wide range of deployment scenarios including Docker Desktop installations, standalone Compose binaries, CI/CD pipelines, and cloud development environments.

Root Cause

The root cause is insufficient path validation when handling OCI artifact annotations. The vulnerable code trusted user-supplied path components from remote OCI artifacts and directly joined them with the local cache directory without checking for path traversal sequences. This allowed attackers to include relative path components (such as ../) in the annotation values to escape the cache directory.

Attack Vector

The attack is network-based and requires user interaction. An attacker creates a malicious OCI compose artifact with specially crafted com.docker.compose.file or com.docker.compose.envfile annotations containing path traversal sequences. When a victim pulls and processes this artifact using any Docker Compose command, the malicious path values are joined with the cache directory, allowing files to be written outside the intended cache location. The attacker can target critical system files, configuration files, or other sensitive locations depending on the privileges of the user running Docker Compose.

go
// Security patch in pkg/remote/oci.go
// Source: https://github.com/docker/compose/commit/69bcb962bfb2ea53b41aa925333d356b577d6176

// validatePathInBase ensures a file path is contained within the base directory,
// as OCI artifacts resources must all live within the same folder.
func validatePathInBase(base, unsafePath string) error {
	// Reject paths with path separators regardless of OS
	if strings.ContainsAny(unsafePath, "\\/") {
		return fmt.Errorf("invalid OCI artifact")
	}

	// Join the base with the untrusted path
	targetPath := filepath.Join(base, unsafePath)

	// Get the directory of the target path
	targetDir := filepath.Dir(targetPath)

	// Clean both paths to resolve any .. or . components
	cleanBase := filepath.Clean(base)
	cleanTargetDir := filepath.Clean(targetDir)

	// Check if the target directory is the same as base directory
	if cleanTargetDir != cleanBase {
		return fmt.Errorf("invalid OCI artifact")
	}

	return nil
}

Source: GitHub Docker Compose Commit

Detection Methods for CVE-2025-62725

Indicators of Compromise

  • Unexpected file modifications or creations outside the Docker Compose cache directory
  • OCI artifacts containing path separators (/ or \) in com.docker.compose.file or com.docker.compose.envfile annotation values
  • Suspicious file write operations during docker compose config, docker compose ps, or similar commands
  • Evidence of files being written to sensitive system directories during Compose operations

Detection Strategies

  • Monitor file system activity for writes to sensitive directories during Docker Compose execution
  • Implement network-level inspection for OCI artifacts with suspicious annotation patterns
  • Use SentinelOne Singularity platform to detect anomalous file system operations by Docker Compose processes
  • Audit Docker Compose cache directory for unexpected path traversal attempts

Monitoring Recommendations

  • Enable detailed logging for Docker Compose operations and monitor for path traversal patterns
  • Implement file integrity monitoring on critical system files and configuration directories
  • Deploy endpoint detection and response (EDR) solutions to identify suspicious file operations
  • Monitor CI/CD pipeline logs for unexpected file system changes during Docker Compose execution

How to Mitigate CVE-2025-62725

Immediate Actions Required

  • Upgrade Docker Compose to version v2.40.2 or later immediately
  • Audit any OCI artifacts from untrusted sources that have been used recently
  • Review file system integrity on systems that have processed remote OCI compose artifacts
  • Restrict the use of remote OCI compose artifacts to trusted registries until patching is complete

Patch Information

Docker has released version v2.40.2 of Docker Compose to address this vulnerability. The fix implements the validatePathInBase function that rejects any path containing path separators and validates that the resolved target directory matches the expected base cache directory. Users should upgrade to this version immediately.

For more details, see the GitHub Security Advisory GHSA-gv8h-7v7w-r22q and the security patch commit.

Workarounds

  • Avoid using remote OCI compose artifacts from untrusted sources until the patch is applied
  • Run Docker Compose in isolated environments with restricted file system access
  • Implement network policies to limit access to untrusted OCI registries
  • Use container security tools to monitor and restrict file operations by Docker processes
bash
# Upgrade Docker Compose to patched version
docker compose version
# If version is below v2.40.2, upgrade immediately

# For standalone binary installations
curl -SL https://github.com/docker/compose/releases/download/v2.40.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

# Verify the installed version
docker-compose version

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechDocker Compose

  • SeverityHIGH

  • CVSS Score8.9

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/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
  • AvailabilityHigh
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Docker Compose Commit

  • GitHub Security Advisory GHSA-gv8h-7v7w-r22q
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS Vulnerability
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