Bug 2587508 (CVE-2026-140019) - CVE-2026-140019 oc-mirror: oc-mirror: path traversal in v1 mirror-archive import allows arbitrary file write
Summary: CVE-2026-140019 oc-mirror: oc-mirror: path traversal in v1 mirror-archive imp...
Keywords:
Status: NEW
Alias: CVE-2026-140019
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-11-30 17:43 UTC by OSIDB Bzimport
Modified: 2026-11-30 17:58 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.