CVE-2026-42575: Chainguard.dev/apko Apko Doesn't Verify Downloaded Apk Vulnerability

HIGH
Advisory Identifier: GHSA-hcwr-pq9g-rq3m
CVSS 7.5
CWE-494 CWE-345
Published
Advisory Summary

CVE-2026-42575 is a HIGH (CVSS 7.5) apko doesn't verify downloaded apk vulnerability (CWE-494: Download of Code Without Integrity Check) affecting Chainguard.dev/apko libraries in the Go ecosystem. The issue involves apko doesn't verify downloaded apk packages against apkindex checksum (package substitution possible). Remediation is available by upgrading affected packages to version 1.2.7.

CVE-2026-42575 at a Glance

CVE Identifier CVE-2026-42575
GHSA Identifier GHSA-hcwr-pq9g-rq3m
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-494: Download of Code Without Integrity Check
Affected Product Chainguard.dev/apko
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-42575

To remediate this vulnerability, upgrade all affected Chainguard.dev/apko dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

chainguard.dev/apko fixed: 1.2.7
Upgrade chainguard.dev/apko to 1.2.7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for chainguard.dev/apko

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-42575, inspect your project dependencies for Chainguard.dev/apko:

inspect dependencies for chainguard.dev/apko

Analyze the terminal output to locate any version of Chainguard.dev/apko in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-494: Download of Code Without Integrity Check, where the product downloads source code or an executable from a remote location and executes the code without sufficiently verifying the origin and integrity of the code. In Chainguard.dev/apko, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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. **Fix:** No fix available yet. **Acknowledgements** apko thanks Oleh Konko from [1seal](https://1seal.org/) for discovering and reporting this issue.

CVE-2026-42575 Affected Chainguard.dev/apko Versions

1 component(s)
Fixed Versions:
1.2.7
Product / Package Ecosystem Affected Versions Fixed Version
chainguard.dev/apko
Go
< 1.2.7
1.2.7

References

Frequently Asked Questions

What is CVE-2026-42575?
CVE-2026-42575 is a security vulnerability in Chainguard.dev/apko involving apko doesn't verify downloaded apk packages against APKINDEX checksum (package substitution possible) under CWE-494: Download of Code Without Integrity Check.
Which Chainguard.dev/apko versions are affected?
Affected versions include releases prior to 1.2.7 across affected packages: chainguard.dev/apko.
What version fixes CVE-2026-42575?
Upgrading to 1.2.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is chainguard.dev/apko affected?
Yes, chainguard.dev/apko is affected in releases prior to 1.2.7. Upgrade your dependency to 1.2.7 or later.
What is the CVSS score of CVE-2026-42575?
CVE-2026-42575 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2026-42575?
CVE-2026-42575 is classified under CWE-494: Download of Code Without Integrity Check (The product downloads source code or an executable from a remote location and executes the code without sufficiently verifying the origin and integrity of the code.).
How can I check Go dependencies for CVE-2026-42575?
Run the dependency tree command: 'inspect dependencies for chainguard.dev/apko'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hcwr-pq9g-rq3m",
  "modified" : "2026-05-13T13:42:49Z",
  "published" : "2026-05-04T21:27:17Z",
  "aliases" : [ "CVE-2026-42575" ],
  "summary" : "apko doesn't verify downloaded apk packages against APKINDEX checksum (package substitution possible)",
  "details" : "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.\n\n**Fix:** No fix available yet.\n\n**Acknowledgements**\n\napko thanks Oleh Konko from [1seal](https://1seal.org/) for discovering and reporting this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "chainguard.dev/apko"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/chainguard-dev/apko/security/advisories/GHSA-hcwr-pq9g-rq3m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42575"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/chainguard-dev/apko/commit/a118c3d604107532b5525bd4bee2fb369a6228aa"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/chainguard-dev/apko"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/chainguard-dev/apko/releases/tag/v1.2.7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345", "CWE-494" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-04T21:27:17Z",
    "nvd_published_at" : "2026-05-09T20:16:29Z"
  }
}