{"id":"CVE-2026-42576","published":"2026-05-09T19:26:56Z","modified":"2026-05-11T14:57:58Z","title":"apko `DiscoverKeys` has a panic on non-rsa jwks key that causes crash during key discovery","vendor":"chainguard-dev","product":"apko","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00252,"percentile":0.17046,"provenance":"source"},"cwes":[{"id":"CWE-704","name":"Incorrect Type Conversion or Cast"}],"references":[{"url":"https://github.com/chainguard-dev/apko/security/advisories/GHSA-m7hm-vm4x-28jf","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/chainguard-dev/apko/commit/6604826b19e36e9bc6e196592800fad93738f4a1","tags":["x_refsource_MISC"]},{"url":"https://github.com/chainguard-dev/apko/releases/tag/v1.2.7","tags":["x_refsource_MISC"]}],"priority":{"score":8.0,"factors":[{"name":"EPSS percentile","points":3.41},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"chainguard-dev","affectedVersions":[{"vendor":"chainguard-dev","product":"apko","versions":["< 1.2.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-05-11T14:57:52.451771Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"chainguard.dev/apko","vulnerableRanges":["<1.2.7"],"patched":["1.2.7"],"from":["GHSA-m7hm-vm4x-28jf","GO-2026-5497"],"provenance":"source"}],"summary":{"text":"A flaw in the DiscoverKeys function in apko's pkg/apk/apk/implementation.go component, which fetches repository keys during APK database initialisation, performs an unchecked type assertion of JWKS keys to RSA. An attacker who can get a repository JWKS endpoint to return a non-RSA key, such as an EC key, and a user who must take action to trigger the fetch can crash apko during key discovery, with no authentication required and no network access stated beyond reaching that endpoint.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:12:14Z"},"euvd":{"id":"EUVD-2026-28934","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-chainguard-dev-apko-cve-2026-25122","parents":[{"from":"CVE-2026-25122","to":"CVE-2026-42576","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["pkg/apk/apk/implementation.go"],"commits":["https://github.com/chainguard-dev/apko/commit/2be3903fe194ad46351840f0569b35f5ac965f09","https://github.com/chainguard-dev/apko/commit/6604826b19e36e9bc6e196592800fad93738f4a1"],"basis":"rarely changed file"}]},{"from":"CVE-2026-25140","to":"CVE-2026-42576","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["pkg/apk/apk/implementation.go"],"commits":["https://github.com/chainguard-dev/apko/commit/2be3903fe194ad46351840f0569b35f5ac965f09","https://github.com/chainguard-dev/apko/commit/6604826b19e36e9bc6e196592800fad93738f4a1"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2026-25140","published":"2026-02-04","fixed":"1.1.1","kev":false},{"cve":"CVE-2026-42574","published":"2026-05-09","fixed":"1.2.5","kev":false,"link":{"from":"CVE-2026-42574","to":"CVE-2026-42576","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Go:chainguard.dev/apko","fromFixed":"1.2.5","toFixed":"1.2.7","daysApart":0}]}},{"cve":"CVE-2026-42575","published":"2026-05-09","fixed":"1.2.7","kev":false},{"cve":"CVE-2026-42576","published":"2026-05-09","fixed":"1.2.7","kev":false},{"cve":"CVE-2026-54174","published":"2026-09-11","fixed":"1.2.9","kev":false}],"package":"Go:chainguard.dev/apko"}}