CVE-2026-42576: CWE-704: Incorrect Type Conversion or Cast in chainguard-dev apko
apko allows users to build and publish OCI container images built from apk packages. Prior to version 1.2.7, 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. This issue has been patched in version 1.2.7.
AI Analysis
Technical Summary
The vulnerability arises from an incorrect type conversion (CWE-704) in the DiscoverKeys function within apko's pkg/apk/apk/implementation.go. The function unconditionally asserts JWKS keys as *rsa.PublicKey without checking if the key is actually RSA. When a JWKS endpoint returns a non-RSA key type, such as an elliptic curve key, the unchecked type assertion causes a runtime panic, crashing the apko process. This affects any operation that initializes the APK database and fetches repository keys, leading to denial of service. The issue is resolved in apko version 1.2.7.
Potential Impact
The vulnerability does not lead to confidentiality or integrity loss but causes a denial of service by crashing apko when it encounters non-RSA JWKS keys. This disrupts workflows that rely on apko for building and publishing OCI container images from apk packages. There are no known exploits in the wild. The CVSS 3.1 base score is 6.5 (medium severity), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, unchanged scope, and impact limited to availability.
Mitigation Recommendations
A fix for this vulnerability is available in apko version 1.2.7. Users should upgrade to version 1.2.7 or later to prevent crashes caused by non-RSA JWKS keys. No other mitigations are indicated or required.
CVE-2026-42576: CWE-704: Incorrect Type Conversion or Cast in chainguard-dev apko
Description
apko allows users to build and publish OCI container images built from apk packages. Prior to version 1.2.7, 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. This issue has been patched in version 1.2.7.
CVSS v3.1
Score 6.5medium
Affected software
pkg:github/chainguard-dev/apkoRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from an incorrect type conversion (CWE-704) in the DiscoverKeys function within apko's pkg/apk/apk/implementation.go. The function unconditionally asserts JWKS keys as *rsa.PublicKey without checking if the key is actually RSA. When a JWKS endpoint returns a non-RSA key type, such as an elliptic curve key, the unchecked type assertion causes a runtime panic, crashing the apko process. This affects any operation that initializes the APK database and fetches repository keys, leading to denial of service. The issue is resolved in apko version 1.2.7.
Potential Impact
The vulnerability does not lead to confidentiality or integrity loss but causes a denial of service by crashing apko when it encounters non-RSA JWKS keys. This disrupts workflows that rely on apko for building and publishing OCI container images from apk packages. There are no known exploits in the wild. The CVSS 3.1 base score is 6.5 (medium severity), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, unchanged scope, and impact limited to availability.
Mitigation Recommendations
A fix for this vulnerability is available in apko version 1.2.7. Users should upgrade to version 1.2.7 or later to prevent crashes caused by non-RSA JWKS keys. No other mitigations are indicated or required.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-28T17:26:12.085Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69ff8cbdcbff5d86106ac340
Added to database: 05/09/2026, 19:36:29 UTC
Last enriched: 05/17/2026, 10:46:27 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 99
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.