Bug 2587508 (CVE-2026-140019)

Summary: CVE-2026-140019 oc-mirror: oc-mirror: path traversal in v1 mirror-archive import allows arbitrary file write
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A path traversal vulnerability was found in oc-mirror's v1 engine. When importing a mirror archive with oc-mirror --v1 --from on a disconnected host, the unarchive() function writes each archive entry to a path computed without validating that it remains inside the destination directory. A crafted mirror archive can exploit this to write files with attacker-controlled content and permissions at arbitrary locations on the host performing the import, potentially leading to code execution with the privileges of the oc-mirror process.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-11-30 17:43:38 UTC
A path traversal flaw was found in the v1 engine of oc-mirror. The unarchive() function in v1/pkg/cli/mirror/publish.go computes the output path for each tar entry as filepath.Join(dest, header.Name), with the only check being that the entry name starts with the "catalogs" prefix. filepath.Join cleans the path but does not prevent escapes, so a mirror-archive containing an entry named catalogs/../../<path> causes oc-mirror --v1 --from to write a file with attacker-chosen content and mode at an arbitrary location outside the destination directory on the importing host, which can lead to code execution by overwriting an executed file. The path validation helper introduced for the catalog image extraction paths is not applied to this function.