`ocipkg`: unpacking an OCI archive can write and delete files outside the local image store (path traversal)
Affects ocipkgSource GCVE Database
CVSS 7.1 High : upgrade to 0.4.1 soon.
Data as of 6 Nov 2026, 15:40 UTC
- Patch
- Available – fixed in 0.4.1
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:HWhat to do
Upgrade ocipkg to 0.4.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
crates.ioocipkgpkg:cargo/ocipkgOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade `ocipkg` to version 0.4.1 or later, where the vulnerability is fixed by validating and sanitizing the image name to prevent path traversal. No other mitigation is required as the fix prevents crafted archives from escaping the local image store.
Description
The `ocipkg` tool has a path traversal vulnerability when unpacking OCI archives. The destination directory for unpacking is derived from an attacker-controlled image name read from the archive's own index.json. This allows escaping the intended local image store directory, enabling deletion and writing of files outside the store. The flaw is fixed in version 0.4.1 by validating and sanitizing the image name to prevent path traversal.