/

CVE-2026-101295

Severity:

HIGH RISK

(7.3)

Path Traversal (CWE-22) in oc-mirror Catalog Extraction

CVE-2026-101295

Awaiting Analysis

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in oc-mirror's operator catalog image extraction can cause archive entries to be written outside the intended destination directory. An attacker who can provide or influence a catalog image layer may overwrite arbitrary files accessible to the mirroring process.

Affected context

The issue occurs when oc-mirror extracts operator catalog image layers through either the legacy v1 workflow or the OCI feature workflow. Risk depends on whether an attacker can influence the catalog image or its layers and whether the extraction process has write access beyond its intended working directory.

Exploit preconditions

  • Attack surface: Operator catalog image extraction during mirroring
  • Required access: Ability to provide or influence a catalog image layer, directly or through a trusted image source
  • Trigger point: Extraction of tar archive entries from catalog image layers
  • Why exploitation is possible: Archive paths are not sufficiently validated to ensure that resolved destinations remain within the designated extraction directory

Why this happens

The vulnerability results from treating archive entry names as safe filesystem paths without canonicalizing them and enforcing destination containment. Path components that refer outside the extraction directory can therefore redirect writes to unintended locations, matching CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

Potential impact

  • Arbitrary files may be overwritten by the mirroring process
  • Local configuration or operational data could be modified
  • The mirroring workflow could be disrupted
  • Security controls or executable files may be altered if writable by the process
  • Follow-on compromise could occur depending on permissions and the affected environment

General mitigation guidance

Mitigation generally focuses on treating archive contents as untrusted and enforcing strict extraction boundaries.

Common defensive patterns include:

  • Canonicalizing each archive entry before writing it
  • Rejecting absolute paths and traversal components
  • Verifying that the resolved destination remains within the intended extraction directory
  • Handling symbolic links and hard links conservatively during extraction
  • Using a dedicated, minimally privileged workspace for catalog processing
  • Restricting catalog image sources and reducing trust in externally supplied image content
  • Applying least-privilege filesystem permissions and isolation around mirroring jobs

How teams detect issues like this

Organizations can detect path traversal risks through:

  • Static analysis for archive extraction APIs that write entries without containment checks
  • Code review signals involving path joins, archive filenames, and symbolic-link handling
  • Tests using absolute paths, parent-directory components, and link-based archive entries
  • Policy checks requiring canonical-path validation before filesystem writes
  • Runtime monitoring for unexpected writes outside designated mirroring workspaces

Automated security scanning and code review tools may help identify missing archive-boundary validation.

Sources

SourceLink
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-101295
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2522941
github.comgithub.com/openshift/oc-mirror/blob/22a5722/v1/pkg/cli/mirror/catalog_images.go#L680
github.comgithub.com/openshift/oc-mirror/blob/22a5722/v1/pkg/cli/mirror/fbc_operators.go#L334-L369

Frequently asked

questions

Exploitability depends on how catalog images reach the mirroring workflow. It may be remotely triggered when the process consumes attacker-controlled or compromised image content, but it generally requires the attacker to influence a catalog image or its layers.

The attacker needs a way to supply, modify, or cause oc-mirror to process a catalog image containing crafted archive entries. The resulting impact also depends on the filesystem permissions of the mirroring process.

Validate and canonicalize every archive path, reject entries that resolve outside the intended directory, and handle links using an explicit safe extraction policy.

Treat archive contents as untrusted, test extraction logic with traversal and link edge cases, limit process privileges, and enforce filesystem isolation and source-trust policies.

Find out what's already
exploitable in your codebase.