Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. chainguard.dev/apko
  4. ›
  5. CVE-2026-42576

CVE-2026-42576: apko `DiscoverKeys` has a panic on non-rsa jwks key that causes crash during key discovery

May 4, 2026 (updated May 13, 2026)

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.

References

  • github.com/advisories/GHSA-m7hm-vm4x-28jf
  • github.com/chainguard-dev/apko/commit/6604826b19e36e9bc6e196592800fad93738f4a1
  • github.com/chainguard-dev/apko/releases/tag/v1.2.7
  • github.com/chainguard-dev/apko/security/advisories/GHSA-m7hm-vm4x-28jf
  • nvd.nist.gov/vuln/detail/CVE-2026-42576

Code Behaviors & Features

Detect and mitigate CVE-2026-42576 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.2.7

Fixed versions

  • 1.2.7

Solution

Upgrade to version 1.2.7 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-704: Incorrect Type Conversion or Cast

Source file

go/chainguard.dev/apko/CVE-2026-42576.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:03 +0000.