ocipkg: Path traversal
Severity and exploitation
KEV coverage does not rule out exploitation.
Assessment vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:HSeverity
high7.1CVSS measures technical severity, not the likelihood of an attack.
Known exploitation
KEV status unavailable or stale
Absence from CISA KEV does not rule out attacks.
Public exploit
Not established by this record
Missing evidence does not mean no public exploit exists.
Remediation
Package fixes recorded
Fix versions are recorded for 1 of 1 mapped packages. Check each release branch and any separate product guidance.
What this means
When ocipkg unpacks an OCI archive, the destination directory is derived from the image name, which ocipkg reads from the archive's own index.json (org.opencontainers.image.ref.name). That name is attacker-controlled, and ImageName::parse accepts a hostname of .., so the computed destination escapes the local image store. A "zip-slip"-style path traversal (CWE-22 / CWE-23). This is esclatable to code execution.
Source excerpt · OSVAttack conditions
No attack-condition excerpt has been identified here. Review the full source description and references for authentication, network access, and configuration requirements.
Review supporting sources →Affected versions
Check the exact model, release, and any platform requirements against your installation.
Packages
Compare each installed version with the publisher’s affected ranges. Where a fix is recorded, choose the appropriate release branch and test compatibility before upgrading.
| Affected range | Recorded fix |
|---|---|
| From 0.0.0-0 before 0.4.1Semantic versions | 0.4.1 |
Version evidence: OSV · RUSTSEC-2026-0450
View original version evidence (0 explicit versions)
What to do
Compare your installed product and version with the affected versions above. A matching product name alone does not confirm exposure.
Use the recorded fix for your release branch. Review the publisher’s instructions and test compatibility before upgrading.
cve.new guidance unless attributed to a publisher. This page does not inspect your installation.
Public exploit evidence
No public exploit reference is identified in the imported evidence. This is not a claim that no exploit exists.
Original source description
Read the full publisher description
`ocipkg`: unpacking an OCI archive can write and delete files outside the local image store (path traversal)
When ocipkg unpacks an OCI archive, the destination directory is derived from the
image name, which ocipkg reads from the archive's own index.json
(org.opencontainers.image.ref.name). That name is attacker-controlled, and
ImageName::parse accepts a hostname of .., so the computed destination escapes the
local image store. A "zip-slip"-style path traversal (CWE-22 / CWE-23). This is esclatable to code execution.
In Artifact::unpack (src/image/artifact.rs), the destination is
image_dir(name) = data_dir().join(name.as_path()) (src/local/mod.rs:31), where the
name comes from get_name_from_index (src/image/layout.rs:114-124):
let image_name = self.base.get_name()?; // from the archive's index.json ref.name
let dest = image_dir(&image_name)?; // data_dir().join(name.as_path()); hostname ".." escapes
if dest.exists() {
if overwrite {
fs::remove_dir_all(&dest)?; // deletes a directory OUTSIDE the store
}
}
fs::create_dir_all(&dest)?;
// ... each tar layer is then unpacked under `dest` (also outside the store)
The fix
Fixed in ocipkg 0.4.1 by PR #223. The leading
reference component is validated against the org.opencontainers.image.ref.name grammar from OCI
Image Specification 1.1.1 on parse and deserialization, and local::image_dir revalidates the name
and rejects any non-normal path component (e.g. ..) before any filesystem mutation, so a crafted
archive can no longer escape the local image store.
References
4 sourcesInside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
No official CVE record has been imported. Use the source links below for the original advisory.
cve.new JSON →Timeline
All times UTCAdvisory published
Publication date supplied by the source.
Source updated
Latest modification date supplied by the source.
Last imported by cve.new
Latest catalog import, not the date we first saw this advisory.
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.
Related advisories
Recent advisories affecting the same package or the same recorded vendor and product. These are separate vulnerabilities, not additional evidence for this advisory.
ocipkg is unmaintained
The author of ocipkg has archived the repository and declared the crate no longer maintained. Version 0.4.1 is stated to be the final release. "No further updates, including security fixes, are planned."
No structured fix or guidance is available here. Check the latest publisher advisory.
Exploitation not established