CVE-2026-25122: apko is vulnerable to unbounded resource consumption in expandapk.Split on attacker-controlled .apk streams
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.
Other sources
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.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-25122?
CVE-2026-25122 is classified as a high-severity vulnerability due to its potential for unbounded resource consumption.
How do I fix CVE-2026-25122?
To fix CVE-2026-25122, update to version 1.1.0 or later of the apko package.
What kind of attack does CVE-2026-25122 facilitate?
CVE-2026-25122 facilitates denial-of-service attacks by causing excessive resource consumption.
What software is affected by CVE-2026-25122?
CVE-2026-25122 affects versions of the apko package prior to 1.1.0.
How does CVE-2026-25122 exploit gzip streams?
CVE-2026-25122 exploits gzip streams by draining data without applying explicit bounds, allowing for large data consumption.