# CVE-2026-25122: apko is vulnerable to unbounded resource consumption in expandapk.Split on attacker-controlled .apk streams

> Attackers can cause resource exhaustion and denial of service in apko by providing malicious APK streams that trigger unbounded gzip inflation.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 4 Feb 2026
- **Updated:** 4 Feb 2026
- **Also known as:** GHSA-6p9p-q6wh-9j89, GO-2026-4406, MINI-ffr3-9whc-cr26

## What is CVE-2026-25122?

CVE-2026-25122 is a medium-severity denial of service vulnerability in chainguard-dev apko, published on 4 Feb 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

apko allows users to build and publish OCI container images built from apk packages. From version 0.14.8 to before 1.1.0, 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. This issue has been patched in version 1.1.0.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2026-25122?

3 open source packages ship an affected version, including chainguard.dev/apko. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `chainguard.dev/apko` | Go | From 0.14.8 | 1.1.0 |
| `chainguard.dev/apko` | Go | From 0.14.8 | 1.1.0 |
| `chainguard.dev/apko` | Go | From 0.14.8 | 1.1.0 |

Products: Chainguard Apko.

## How do I fix CVE-2026-25122?

Upgrade chainguard.dev/apko to 1.1.0 or later.

## Is CVE-2026-25122 being exploited?

There is no known exploitation of CVE-2026-25122 in the wild and no public exploit code.

## Other vulnerabilities in chainguard-dev apko

- [CVE-2026-25121](https://insights.sbomify.com/CVE-2026-25121/): apko is vulnerable to path traversal in apko dirFS which allows filesystem writes outside base (high 7.5)
- [CVE-2026-25140](https://insights.sbomify.com/CVE-2026-25140/): apko affected by potential unbounded resource consumption in expandapk.ExpandApk on attacker-controlled .apk streams (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-25122 and fix it if it is affected.

What it is: CVE-2026-25122 is a medium-severity denial of service vulnerability in chainguard-dev apko, published on 4 Feb 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-25122 in the wild and no public exploit code.

Affected packages and fixed versions:
- chainguard.dev/apko (Go): affected from 0.14.8; fixed in 1.1.0
- chainguard.dev/apko (Go): affected from 0.14.8; fixed in 1.1.0
- chainguard.dev/apko (Go): affected from 0.14.8; fixed in 1.1.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-25122/ (Markdown: https://insights.sbomify.com/CVE-2026-25122/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-25122
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-25122
- OSV: https://osv.dev/vulnerability/CVE-2026-25122

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-25122/
Summaries are generated and may contain mistakes; the official description above is the record.
