apko CVE-2026-42576
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessConfigure malicious APK repository with non-RSA JWKS key
-
DeliveryUser runs apko build workflow
-
Exploitapko fetches JWKS from malicious endpoint
-
ExecutionType assertion fails on EC/non-RSA key
-
PersistPanic crashes apko process
-
ImpactBuild pipeline halts
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Correct type conversion
|
| Exploitation Conditions | The vulnerability requires that a repository JWKS endpoint returns a non-RSA key type (e.g., elliptic curve). Exploitation occurs when apko initializes the APK database and attempts key discovery, which happens during the normal course of any container build workflow using an affected APK repository. The attack surface is limited to scenarios where users configure APK repositories pointing to attacker-controlled or compromised JWKS endpoints, or where an attacker performs a man-in-the-middle attack on HTTPS traffic to inject a non-RSA key. Default apko configurations using only official Chainguard or Alpine repositories are not affected unless those endpoints are compromised. No authentication bypass or privilege escalation is required-any network user can serve a malicious JWKS response if they control the repository endpoint or can intercept traffic. |
| Impact | While CVSS 6.5 indicates medium severity, the real-world risk is context-dependent. The CVSS vector (AV:N/AC:L/PR:N/UI:R/S:U) confirms network accessibility and low attack complexity, but requires user interaction-meaning an attacker must trick a user into running apko against a malicious repository or compromise a legitimate JWKS endpoint. The availability impact is absolute (denial of service via crash), but scope is limited to the apko process itself with no code execution or data breach potential. The absence of any public exploit code or CISA KEV listing suggests this is not yet under active attack. However, defenders should note that the vulnerability is trivial to exploit (simply return a non-RSA key from JWKS) and would immediately halt container builds for affected users. The lack of a released patch as of the analysis date elevates practical risk for organizations that depend on apko in CI/CD pipelines, particularly if they use third-party or less-trusted APK repositories. EPSS data is unavailable, but the low barrier to exploitation (AC:L/PR:N) suggests moderate weaponization likelihood if attackers target supply chains. |
| Exploit ScenarioDerived | An attacker compromises or spoofs a repository JWKS endpoint and returns an elliptic curve public key instead of an RSA key. When a user runs apko to build a container image with that repository configured, the DiscoverKeys function fetches the malicious JWKS, attempts to cast the EC key as an RSA key, and the type assertion panics, crashing the apko process and halting the entire build pipeline. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 04, 2026
Apko crashes via denial-of-service when a repository JWKS endpoint returns a non-RSA key due to an unchecked type assertion in the DiscoverKeys function. The vulnerability affects any workflow initializing the APK database and requires user interaction to trigger (e.g., running apko with a malicious repository), with CVSS 6.5 reflecting the availability impact. No patch is currently available, though the issue is confirmed and acknowledged by the apko maintainers.
RemediationAI
Upgrade apko to version 1.2.7 or later, which resolves the unchecked type assertion by validating JWKS key types before casting. If immediate upgrade is not feasible, implement network-layer compensating controls: restrict outbound connections from CI/CD runners to only trusted, internally-managed APK repository JWKS endpoints using firewall rules or proxy filtering, and disable or remove any APK repository configurations pointing to external or untrusted sources. A secondary mitigation would involve running apko in a containerized sandbox with resource limits to prevent process crashes from affecting the host system, though this does not prevent the denial of service to the build pipeline itself. Review all configured APK repository endpoints to identify high-risk sources, and prioritize upgrades for environments using third-party repositories. See GitHub advisory GHSA-m7hm-vm4x-28jf for official guidance.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability exists in the DiscoverKeys function within pkg/apk/apk/implementation.go of apko, a tool for building container images using APK packages. The function fetches JSON Web Key Sets (JWKS) from repository endpoints to verify package signatures. The root cause (CWE-704: Incorrect Type Conversion or Cast) stems from an unconditional type assertion that assumes all JWKS keys are RSA public keys without validating the actual key type. When a repository returns elliptic curve (EC) or other non-RSA keys, the assertion fails at runtime, triggering a Go panic that crashes the apko process. This affects the APK package manager integration layer responsible for key discovery during database initialization.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Primary rating from Vendor (https://github.com/chainguard-dev/apko).
CVSS VectorVendor: https://github.com/chainguard-dev/apko
DescriptionCVE.org
DiscoverKeys in pkg/apk/apk/implementation.go unconditionally type-asserts JWKS keys as *rsa.PublicKey without checking the key type. If a repository JWKS endpoint returns a non-RSA key (e.g. EC), the unchecked assertion panics and crashes apko. This affects any workflow that initializes the APK database and fetches repository keys. Affected versions <= 0.30.34.
Fix: No fix available yet.
Acknowledgements
apko thanks Oleh Konko from 1seal for discovering and reporting this issue.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)CVE.org
Same weakness CWE-704 – Incorrect Type Conversion or Cast
View allSame technique Denial Of Service
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
GHSA-m7hm-vm4x-28jf
NVD
CVE.org
EPSS
Exploit-DB