Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGet malicious package into apko build
-
DeliveryShip passwd/group entry with UID 4294967296
-
Exploitapko parses and truncates value to 0
-
ExecutionEntry written into built image as root
-
ImpactImage run-as user resolves to UID 0
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Numeric truncation prevention
|
| Exploitation Conditions | Exploitation requires the attacker to control a package that apko installs into the image being built (a supply-chain foothold, not arbitrary remote access), and that package must ship an /etc/passwd or /etc/group entry whose UID or GID is out of uint32 range - e.g. 4294967296 (2^32), 4294968296, or a negative value like -1. The build must run apko version 0.2.0 up to (but not including) 1.4.5 on a 64-bit platform, where the value is truncated/wrapped to 0 rather than rejected (the committed fixture notes that 32-bit archive/tar writers reject such values before apko sees them, though the consumer's word size is what ultimately matters). LIMITING FACTORS: the attacker cannot act without first getting a crafted package into the build inputs, and the impact is confined to the produced image's ownership/run-as user; there is no confidentiality or availability impact on the build host itself. |
| Impact | This is a genuine but conditional supply-chain/privilege-escalation issue rather than a broadly exploitable remote flaw. The official CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N) scores 6.3 (Medium), and the AT:P (attack requirement) is the critical qualifier: exploitation is NOT possible by an arbitrary remote attacker - it requires the attacker to already control a package that apko installs into the image being built. Impact is integrity-only (VI/SI:L, VC:N/VA:N), consistent with an attacker silently promoting an entry to UID 0/GID 0 (root) in the produced image rather than stealing data from or crashing the build host. No EPSS score, CISA KEV listing, or public POC was provided in the input, so there is no public exploit identified at time of analysis; the absence of KEV/EPSS signals means this is a 'patch in normal cycle' item, not an emergency, but the root-UID outcome makes it meaningful for anyone building apk/OCI images from untrusted or third-party packages. CONFLICT TO NOTE: the input Tag 'Information Disclosure' contradicts the CVSS vector, which sets VC:N (no confidentiality impact) - this is an integrity/privilege-escalation bug, not an information-disclosure bug. |
| Exploit ScenarioDerived | An attacker who can get a malicious apk package included in an apko build (e.g., a compromised or typosquatted dependency package) ships an /etc/passwd or /etc/group entry declaring an out-of-range UID/GID such as 4294967296 (2^32) or -1. On a 64-bit build host apko's UserEntry.Parse/GroupEntry.Parse truncate or wrap that value to 0, so the entry - and any setuid binary or run-as user it governs - is written into the final image as root. No public exploit code was identified in the input data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 05, 2026
apko truncates out-of-range UID and GID values that it parses from package-supplied /etc/passwd and /etc/group entries, so a crafted package can make an account that appears unprivileged be written into the resulting image as UID 0 / GID 0 (root). An attacker must first control a package installed into the image being built - a supply-chain foothold rather than arbitrary remote access - and the impact is confined to the produced image's file ownership and its resolved run-as user, not the build host itself. The flaw affects apko versions 0.2.0 up to but not including 1.4.5 on 64-bit platforms; it is rated 6.3 under CVSS 4.0 (independently assessed as AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N on CVSS 3.1), and no public exploit code or confirmed active exploitation was identified at time of analysis. Vendor-released patch: 1.4.5.
RemediationAI
Upgrade apko to 1.4.5 or later, the vendor-released patch version; the fix is carried in commit 739e7ce3f675ffb232e16849b51ff93657f1570c and pull request https://github.com/chainguard-dev/apko/pull/2516, both referenced from advisory GHSA-rj6x-hwpv-vhvf. Upstream now rejects an out-of-range owner at write time with errors such as "invalid uid 4294967296" and "invalid gid -1", and refuses to persist the record so the installed-package database remains readable - the trade-off is that a build containing such a package fails rather than silently normalising it, so pipelines must be prepared to fail closed. Because exploitation requires attacker-controlled packages rather than network reachability, the effective compensating controls are supply-chain ones: pin and mirror apk repositories, verify package signatures and provenance before they enter the build, and allowlist the packages a build may install. Where upgrading is not immediately possible, inspect the passwd and group entries shipped by every package in the build inputs for owners outside the uint32 range or with negative values, and post-process built images to assert that no unexpected files are owned by UID 0 or GID 0 and that no unintended setuid (04755) binaries appear - both checks are detection rather than prevention and will miss an attacker who also controls the manifest or run-as configuration. No public exploit code was identified at time of analysis, and no CISA KEV entry indicates active exploitation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-197, numeric truncation error. In pkg/passwd, the UserEntry.Parse and GroupEntry.Parse functions read the UID and GID text fields with strconv.Atoi and convert the result to uint32 without validating that the value lies within the uint32 range. On 64-bit platforms a value such as 4294967296 (2^32) narrows to 0, 4294968296 narrows to 1000, and negative values such as -1 wrap, so an archive header that declares a high or negative owner silently becomes root in the rebuilt image. apko sits in the container-image supply chain: it resolves apk packages, parses the passwd and group entries they carry, and writes those entries back into the OCI image it publishes, so the truncated identity propagates into the image's account database and into run-as user resolution. The upstream fix extends coverage across the tar encodings a real producer can emit - the committed generator gen_owner_width_fixture.go builds PAX and GNU fixtures spanning 0, 1, 65534, 2147483647 (MaxInt32), 2147483648, 4294967295 (MaxUint32), 2^32, 2^32+1000 and -1 - because archive/tar's own writer cannot express these values on a 32-bit host, whereas an attacker writing raw PAX records or GNU base-256 values is under no such restriction. Notably, the write path is hardened alongside the read path, since a read-side range error aborts parsing of the entire database rather than just the offending record.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N
Requires controlling a package apko installs (no auth on apko, so PR:N but AC:H); scope changes to the built image (S:C) with integrity-only impact (C:N/I:L/A:N).
Primary rating from Vendor (82cea9a6-e9e3-46fe-bdb0-3673de380178).
CVSS VectorVendor: 82cea9a6-e9e3-46fe-bdb0-3673de380178
Lifecycle Timeline
1DescriptionCVE.org
apko allows users to build and publish OCI container images built from apk packages. From version 0.2.0 to before version 1.4.5, UserEntry.Parse and GroupEntry.Parse in pkg/passwd read the UID and GID fields of /etc/passwd and /etc/group entries with strconv.Atoi and convert them to uint32 without a range check. On 64-bit platforms an out-of-range value such as 4294967296 (2^32) is truncated to 0, and negative values wrap. Because apko parses the passwd and group entries supplied by the packages it installs and writes them back into the image, an attacker who controls a package installed into the image can ship an entry that appears to declare an unprivileged UID or GID but is written into the built image as UID 0 or GID 0 (root). The truncated UID is also used when resolving the image's run-as user. This issue has been fixed in version 1.4.5.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
EUVD-2026-92789
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB