CVE-2026-25122: Chainguard.dev/apko Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-6p9p-q6wh-9j89
CVSS 5.5
CWE-400 CWE-770
Published
Advisory Summary

CVE-2026-25122 is a MODERATE (CVSS 5.5) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Chainguard.dev/apko libraries in the Go ecosystem. The issue involves apko affected by unbounded resource consumption in expandapk.split on attacker-controlled .apk streams. Remediation is available by upgrading affected packages to version 1.1.0.

CVE-2026-25122 at a Glance

CVE Identifier CVE-2026-25122
GHSA Identifier GHSA-6p9p-q6wh-9j89
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Chainguard.dev/apko
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.5

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

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

How to Fix CVE-2026-25122

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.1.0
Upgrade chainguard.dev/apko to 1.1.0
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-25122, 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.1.0), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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

`expandapk.Split` drains the first gzip stream of an APK archive via `io.Copy(io.Discard, gzi)` without explicit bounds. With an attacker-controlled input stream, this can force large gzip inflation work and lead to resource exhaustion (availability impact). The `Split` function reads the first tar header, then drains the remainder of the gzip stream by reading from the gzip reader directly without any maximum uncompressed byte limit or inflate-ratio cap. A caller that parses attacker-controlled APK streams may be forced to spend excessive CPU time inflating gzip data, leading to timeouts or process slowdown. **Fix:** Fixed with [2be3903](https://github.com/chainguard-dev/apko/commit/2be3903fe194ad46351840f0569b35f5ac965f09), Released in v1.1.0. **Acknowledgements** apko thanks Oleh Konko from [1seal](https://1seal.org/) for discovering and reporting this issue.

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

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

References

Frequently Asked Questions

What is CVE-2026-25122?
CVE-2026-25122 is a security vulnerability in Chainguard.dev/apko involving apko affected by unbounded resource consumption in expandapk.Split on attacker-controlled .apk streams under CWE-400: Uncontrolled Resource Consumption.
Which Chainguard.dev/apko versions are affected?
Affected versions include releases prior to 1.1.0 across affected packages: chainguard.dev/apko.
What version fixes CVE-2026-25122?
Upgrading to 1.1.0 (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.1.0. Upgrade your dependency to 1.1.0 or later.
What is the CVSS score of CVE-2026-25122?
CVE-2026-25122 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-25122?
CVE-2026-25122 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Go dependencies for CVE-2026-25122?
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-6p9p-q6wh-9j89",
  "modified" : "2026-02-04T21:55:51Z",
  "published" : "2026-02-03T23:58:37Z",
  "aliases" : [ "CVE-2026-25122" ],
  "summary" : "apko affected by unbounded resource consumption in expandapk.Split on attacker-controlled .apk streams ",
  "details" : "`expandapk.Split` drains the first gzip stream of an APK archive via `io.Copy(io.Discard, gzi)` without explicit bounds. With an attacker-controlled input stream, this can force large gzip inflation work and lead to resource exhaustion (availability impact).                                                                                                                      \n                                                                                                                                                                                              \nThe `Split` function reads the first tar header, then drains the remainder of the gzip stream by reading from the gzip reader directly without any maximum uncompressed byte limit or inflate-ratio cap. A caller that parses attacker-controlled APK streams may be forced to spend excessive CPU time inflating gzip data, leading to timeouts or process slowdown.             \n                                                                                                                                                                                              \n**Fix:** Fixed with [2be3903](https://github.com/chainguard-dev/apko/commit/2be3903fe194ad46351840f0569b35f5ac965f09), Released in v1.1.0.                                                  \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:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "chainguard.dev/apko"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.14.8"
      }, {
        "fixed" : "1.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/chainguard-dev/apko/security/advisories/GHSA-6p9p-q6wh-9j89"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25122"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/chainguard-dev/apko/commit/2be3903fe194ad46351840f0569b35f5ac965f09"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/chainguard-dev/apko"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-03T23:58:37Z",
    "nvd_published_at" : "2026-02-04T19:16:14Z"
  }
}