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-42574

CVE-2026-42574: apko Path Traversal Vulnerability

CVE-2026-42574 is a path traversal vulnerability in apko that allows crafted .apk files to escape build root via symlinks. This article covers the technical details, affected versions 0.14.8 to 1.2.5, and mitigations.

Published: May 18, 2026

CVE-2026-42574 Overview

CVE-2026-42574 is a path traversal vulnerability [CWE-22] in apko, the Chainguard tool that builds and publishes Open Container Initiative (OCI) container images from apk packages. Versions from 0.14.8 to before 1.2.5 mishandle TypeSymlink entries in tar archives during package extraction. A crafted .apk can install a symlink whose target points outside the build root. A subsequent directory-creation or file-write entry then traverses that symlink to reach host paths writable by the build user. The issue is patched in apko version 1.2.5.

Critical Impact

A malicious .apk package processed by apko can write arbitrary files to the host filesystem outside the intended build root, enabling supply chain compromise of container build infrastructure.

Affected Products

  • apko versions 0.14.8 through 1.2.4
  • Chainguard container build pipelines consuming untrusted .apk packages
  • CI/CD systems invoking apko to assemble OCI images from external repositories

Discovery Timeline

  • 2026-05-09 - CVE-2026-42574 published to NVD
  • 2026-05-13 - Last updated in NVD database

Technical Details for CVE-2026-42574

Vulnerability Analysis

The vulnerability lives in the apko filesystem abstraction used to materialize package contents on disk. When apko processes a .apk tar archive, it iterates over entries and creates directories, files, and symlinks under a build root directory. The extraction logic resolves paths through the standard Go os package without constraining symlink resolution to the build root.

A crafted .apk includes a TypeSymlink entry such as link -> ../../../../etc. The symlink is created inside the build root. A later entry in the same archive (or a subsequent archive processed in the same build) references a path that traverses through the attacker-controlled symlink. The follow-up Mkdir, Create, or Mknod call then operates on a host path outside the build root, inheriting the privileges of the build user.

Root Cause

The root cause is missing sandbox containment during symlink resolution in the DirFS implementation. Path operations were not scoped through Go's os.Root API, which enforces that all path resolution stays within a designated root directory. Without that constraint, intermediate symlinks created by the archive were followed by subsequent syscalls.

Attack Vector

An attacker publishes or substitutes a malicious .apk consumed by an apko build. When apko extracts the package, the planted symlink is dereferenced by a later tar entry, granting file write primitives outside the build root. No authentication or user interaction is required on the build host; the build pipeline itself triggers extraction.

go
// Patch excerpt: pkg/apk/fs/rwosfs_mknod_linux.go
//go:build linux

package fs

import (
	"path"

	"golang.org/x/sys/unix"
)

// mknodOnDisk issues mknodat against a root-constrained parent directory FD
// so the syscall cannot be tricked into traversing a symlink out of the
// sandbox. If the underlying filesystem refuses the mode (e.g. tmpfs
// rejecting certain device types), a zero-byte placeholder is written
// through the root instead.
func (f *dirFS) mknodOnDisk(rel string, mode uint32, dev int) error {

Source: GitHub Commit f5a96e1

Detection Methods for CVE-2026-42574

Indicators of Compromise

  • Files written outside the configured apko build root, particularly under user-writable host directories such as /home, /tmp, or the build user's home.
  • .apk archives containing TypeSymlink entries whose targets contain .. sequences or absolute paths.
  • Unexpected modifications to CI runner state, scripts, or SSH keys following an apko build.

Detection Strategies

  • Inspect .apk packages with tar -tvf before consumption and flag any symlink entry whose target resolves outside the archive prefix.
  • Compare the post-build filesystem state of CI runners against a known-good baseline to identify writes outside the build root.
  • Audit apko version strings across build infrastructure and alert on any version between 0.14.8 and 1.2.4.

Monitoring Recommendations

  • Run apko inside ephemeral containers or rootless sandboxes so any traversal is bounded by the container filesystem.
  • Enable filesystem auditing on build hosts to log writes by the build user outside the designated workspace.
  • Subscribe to GitHub Security Advisories for the chainguard-dev/apko repository to receive future fix notifications.

How to Mitigate CVE-2026-42574

Immediate Actions Required

  • Upgrade apko to version 1.2.5 or later on all build hosts and CI runners.
  • Restrict .apk package sources to trusted, signed repositories under organizational control.
  • Run apko builds under dedicated low-privilege users with no write access to host directories outside the build workspace.

Patch Information

The fix is released in apko1.2.5. The patch scopes all DirFS operations through Go's os.Root, ensuring that Mkdir, Create, and Mknod calls cannot traverse symlinks outside the build root. See the GitHub Security Advisory GHSA-qq3r-w4hj-gjp6, GitHub Release v1.2.5, and Pull Request #2187 for full details.

Workarounds

  • Execute apko inside a disposable container or VM so any out-of-root writes are confined to the sandbox.
  • Pre-scan .apk archives for symlink entries with traversal targets and reject packages that contain them.
  • Limit the build user's filesystem permissions to the build root only, preventing writes elsewhere on the host.
bash
# Upgrade apko to the patched release
go install chainguard.dev/apko@v1.2.5

# Verify the installed version
apko version

# Pre-scan untrusted .apk packages for traversal symlinks
for pkg in *.apk; do
  tar -tvf "$pkg" | awk '/^l/ {print $NF}' | grep -E '(^/|\.\./)' \
    && echo "REJECT: $pkg contains traversal symlink"
done

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechApko

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Commit Update

  • GitHub Pull Request Discussion

  • GitHub Release v1.2.5

  • GitHub Security Advisory GHSA-qq3r-w4hj-gjp6
  • Related CVEs
  • CVE-2026-25121: apko Path Traversal Vulnerability

  • CVE-2026-42575: apko Container Image RCE Vulnerability

  • CVE-2026-42576: apko OCI Image Builder DoS Vulnerability

  • CVE-2026-25122: apko Container Image Tool DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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