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 unchecked type assertion in the DiscoverKeys function within apko's implementation, which assumes all JWKS keys are RSA public keys. When a JWKS endpoint returns a key of a different type (e.g., EC), the type assertion fails, causing the application to panic and crash. This impacts any process that initializes the APK database and fetches repository keys. The issue is fixed in apko version 1.2.7.
Potential Impact
The vulnerability results in a denial of service condition by crashing apko when encountering non-RSA JWKS keys. There is no confidentiality or integrity impact reported. The CVSS score is 6.5 (medium severity) reflecting a network attack vector with low complexity and no privileges required but requiring user interaction, causing availability impact only.
Mitigation Recommendations
Upgrade apko to version 1.2.7 or later where this issue is patched. No other mitigation is 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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from an unchecked type assertion in the DiscoverKeys function within apko's implementation, which assumes all JWKS keys are RSA public keys. When a JWKS endpoint returns a key of a different type (e.g., EC), the type assertion fails, causing the application to panic and crash. This impacts any process that initializes the APK database and fetches repository keys. The issue is fixed in apko version 1.2.7.
Potential Impact
The vulnerability results in a denial of service condition by crashing apko when encountering non-RSA JWKS keys. There is no confidentiality or integrity impact reported. The CVSS score is 6.5 (medium severity) reflecting a network attack vector with low complexity and no privileges required but requiring user interaction, causing availability impact only.
Mitigation Recommendations
Upgrade apko to version 1.2.7 or later where this issue is patched. No other mitigation is 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: 5/9/2026, 7:36:29 PM
Last enriched: 5/9/2026, 7:51:54 PM
Last updated: 5/10/2026, 6:56:31 AM
Views: 11
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.