CVE-2026-25122
JSON

5.5medium

apko is vulnerable to unbounded resource consumption in expandapk.Split on attacker-controlled .apk streams

Severity
5.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.13% (higher than 2% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-6p9p-q6wh-9j89GO-2026-4406

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.

Affected

Product or packageVersionsReported by
chainguard-dev apko>= 0.14.8, < 1.1.0CVE List
chainguard.dev/apko (Go)from 0.14.8 before 1.1.0GitHub Advisory Database, Go Vulnerability Database
chainguard apkofrom 0.14.8 before 1.1.0NVD

All scores

GitHub_M5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
GitHub5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Classification

CWE-400CWE-770

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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, Released in v1.1.0.

Acknowledgements

apko thanks Oleh Konko from 1seal for discovering and reporting this issue.

Go Vulnerability Database

apko affected by unbounded resource consumption in expandapk.Split on attacker-controlled .apk streams in chainguard.dev/apko

NVD (es)

apko permite a los usuarios construir y publicar imágenes de contenedor OCI construidas a partir de paquetes apk. Desde la versión 0.14.8 hasta antes de la 1.1.0, expandapk.Split drena el primer flujo gzip de un archivo APK a través de io.Copy(io.Discard, gzi) sin límites explícitos. Con un flujo de entrada controlado por un atacante, esto puede forzar un gran trabajo de descompresión gzip y llevar al agotamiento de recursos (impacto en la disponibilidad). La función Split lee la primera cabecera tar, luego drena el resto del flujo gzip leyendo directamente del lector gzip sin ningún límite máximo de bytes descomprimidos o tope de relación de descompresión. Un llamador que analiza flujos APK controlados por un atacante puede verse forzado a gastar un tiempo excesivo de CPU descomprimiendo datos gzip, lo que lleva a tiempos de espera o ralentización del proceso. Este problema ha sido parcheado en la versión 1.1.0.

References

Related

Sources

SourceRecordLicence
CVE ListCVE-2026-25122 changed 2026-02-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-6p9p-q6wh-9j89 changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2026-4406 changed 2026-02-06CC-BY-4.0
NVDCVE-2026-25122 changed 2026-06-17Public domain