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

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

CVE-2026-42576 is a denial of service vulnerability in apko that causes crashes when processing non-RSA keys from repository JWKS endpoints. This article covers the technical details, affected versions, and mitigation steps.

Published: May 18, 2026

CVE-2026-42576 Overview

CVE-2026-42576 is a denial of service vulnerability in apko, a tool from Chainguard that builds and publishes Open Container Initiative (OCI) container images from apk packages. The flaw resides in the DiscoverKeys function in pkg/apk/apk/implementation.go, which performs an unchecked type assertion on JSON Web Key Set (JWKS) keys retrieved from repository endpoints. When a repository returns a non-RSA key such as an Elliptic Curve (EC) key, the assertion panics and crashes the apko process. Any workflow that initializes the APK database and fetches repository keys is affected. The issue has been patched in version 1.2.7.

Critical Impact

A malicious or misconfigured repository JWKS endpoint can crash apko build pipelines by returning a non-RSA key, halting container image build and publish workflows.

Affected Products

  • Chainguard apko versions prior to 1.2.7
  • Build pipelines and CI systems invoking apko against external repositories
  • Workflows initializing the APK database with remote JWKS key discovery

Discovery Timeline

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

Technical Details for CVE-2026-42576

Vulnerability Analysis

The vulnerability is an [CWE-704] incorrect type conversion in the DiscoverKeys function within pkg/apk/apk/implementation.go. The function iterates over keys returned from a repository's JWKS endpoint and unconditionally type-asserts each key as *rsa.PublicKey before passing it to x509.MarshalPKIXPublicKey. Go's type assertion without the comma-ok idiom triggers a runtime panic when the underlying concrete type differs from the asserted type. If a repository returns an EC key, an OKP key, or any other JWK algorithm, the assertion fails and the apko process terminates.

The attacker-controlled input is the JWKS document served by the repository host. Because apko fetches and parses these keys during APK database initialization, a single malformed key entry is sufficient to disrupt the entire build. The crash propagates to any orchestration layer invoking apko, including CI/CD pipelines producing release artifacts.

Root Cause

The root cause is the absence of a type-check guard before the type assertion. The original code path assumed all JWKS keys would be RSA without validating the algorithm metadata or using a safe assertion pattern. Any deviation from RSA causes an unrecoverable panic rather than a handled error.

Attack Vector

Exploitation requires the victim to invoke apko against a repository whose JWKS endpoint returns a non-RSA key. The vector is network-based and requires user interaction in the form of executing a build. Confidentiality and integrity are not impacted; only availability is affected through process termination.

go
// Patched code in pkg/apk/apk/implementation.go
// Source: https://github.com/chainguard-dev/apko/commit/6604826b19e36e9bc6e196592800fad93738f4a1
		}
 		keyName := key.KeyID + ".rsa.pub"
 
-		b, err := x509.MarshalPKIXPublicKey(key.Key.(*rsa.PublicKey))
+		rsaKey, ok := key.Key.(*rsa.PublicKey)
+		if !ok {
+			return nil, fmt.Errorf("unsupported JWKS key type %T for key %q: expected *rsa.PublicKey", key.Key, key.KeyID)
+		}
+		b, err := x509.MarshalPKIXPublicKey(rsaKey)
 		if err != nil {
 			return nil, err
 		} else if len(b) == 0 {

The patch replaces the unchecked assertion with the comma-ok form and returns a descriptive error when a non-RSA key is encountered. See the GitHub Security Advisory GHSA-m7hm-vm4x-28jf for additional detail.

Detection Methods for CVE-2026-42576

Indicators of Compromise

  • Unexpected apko process termination with a Go runtime panic referencing *rsa.PublicKey interface conversion
  • CI/CD pipeline failures during the APK database initialization phase
  • Repository JWKS endpoints serving keys with kty values other than RSA

Detection Strategies

  • Audit build logs for Go panic stack traces mentioning pkg/apk/apk/implementation.go and DiscoverKeys
  • Inventory all apko binaries in build infrastructure and compare versions against 1.2.7
  • Monitor outbound requests from build agents to unfamiliar APK repository hosts

Monitoring Recommendations

  • Alert on apko exit codes indicating runtime panic versus normal failure
  • Track build pipeline reliability metrics for sudden spikes in crash-related failures
  • Log and review repository URLs supplied to apko invocations across CI jobs

How to Mitigate CVE-2026-42576

Immediate Actions Required

  • Upgrade apko to version 1.2.7 or later across all build hosts and container images
  • Pin trusted APK repository URLs in build configurations to prevent redirection to untrusted JWKS endpoints
  • Rebuild and republish any images produced by vulnerable apko versions to confirm pipeline integrity

Patch Information

Chainguard released the fix in apko v1.2.7. The patch commit 6604826 introduces a safe type assertion and returns a structured error for unsupported JWKS key types instead of panicking.

Workarounds

  • Restrict apko to repositories known to publish RSA JWKS keys until upgrade is complete
  • Run apko invocations under a supervisor that restarts builds and surfaces panic conditions for triage
  • Use network egress controls to limit build agents to allowlisted repository hosts
bash
# Verify installed apko version and upgrade
apko version
go install chainguard.dev/apko@v1.2.7
# Confirm upgrade
apko version | grep -E "1\.2\.[7-9]|1\.[3-9]"

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechApko

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.03%

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

  • GitHub Release v1.2.7

  • GitHub Security Advisory GHSA-m7hm-vm4x-28jf
  • Related CVEs
  • CVE-2026-25122: apko Container Image Tool DoS Vulnerability

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

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

  • CVE-2026-42574: apko Path Traversal 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