CVE-2026-107174

Description

A flaw was found in source-to-image. When unpacking archive files, the application fails to properly sanitize symbolic links pointing to absolute file paths. An attacker who supplies a malicious builder image can exploit this vulnerability by embedding links pointing outside the extraction directory. This allows the attacker to bypass sandbox boundaries, potentially leading to unauthorized information disclosure or file modification on the host system.

Statement

A flaw was found in the source-to-image (s2i) tool used during container image builds. When s2i extracts a tar archive in its restricted ("paranoid") mode, symlink entries are validated using a computed path, but the symlink is still created using the raw target from the archive. If that target is an absolute path, the check can succeed while the symlink on disk points outside the intended extraction directory. This weakens the containment that was introduced for an earlier tar extraction issue (CVE-2018-1103).

An attacker who can supply or influence the tar content used during an s2i build (for example through a malicious or compromised builder image or build scripts such as assemble or save-artifacts) may cause symlinks to be written that reference arbitrary locations on the build host filesystem. Further impact depends on whether later build steps follow those symlinks.

This issue affects Red Hat offerings that ship or embed source-to-image for builds, including Red Hat OpenShift Container Platform 4.12 through 4.22, the source-to-image container images, and select related products identified in this flaw record.

Red Hat is evaluating fixes for affected products. Customers should only use trusted builder images and trusted application source for s2i-based builds until an updated source-to-image version is available in their environment.

Mitigation

Treat s2i builder images and application source as trusted inputs. Do not run s2i-based builds against builder images or repositories you do not control or have not verified.

Where possible, run builds on isolated build nodes and restrict who can trigger builds or change BuildConfig and image stream references that point at custom builder images.

There is no configuration option to disable only this symlink extraction behavior without changing how builds are performed. Apply updated source-to-image packages or rebuilt platform images when Red Hat publishes them for your product and stream.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score6.4N/A6.4
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredLowN/ALow
User InteractionNoneN/ANone
ScopeChangedN/AChanged
ConfidentialityLowN/ALow
Integrity ImpactLowN/ALow
Availability ImpactNoneN/ANone

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N

cve.org: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N

Understanding the Weakness (CWE)

Confidentiality,Integrity

Technical Impact: Read Files or Directories; Modify Files or Directories

A product that allows a symbolic link (symlink) as part of a path - whether in internal code or through user input - can allow an attacker to spoof the symbolic link and traverse the file system to unintended locations or access arbitrary files. An attacker could read, write, or /corrupt a file that they originally did not have permissions to access directly.

Acknowledgements

Red Hat would like to thank Yashashree Gund for reporting this issue.

Frequently Asked Questions

Want to get errata notifications? Sign up here.