CVE-2026-115207

Patch: filename validation bypass in reversal fallback allows file creation outside the working directory

Published Oct 22, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
A flaw was found in GNU patch. An attacker can achieve arbitrary file creation outside the intended working directory by enticing a user or automated workflow to apply a specially crafted patch file. Due to missing validation during automatic patch reversal, absolute file paths in patch headers are accepted rather than rejected. Consequently, the utility can create files in arbitrary locations with the permissions of the executing user.

Analysis

AI-generated

Technical impact

A flaw in the GNU patch utility allows an attacker to create files outside the intended working directory. The flaw exists because patch does not validate absolute paths in the patch headers when automatically reversing changes, so an attacker can supply a patch file containing an absolute path in a header line. When applied, patch creates the file at that path with the permissions of the user running the patch command, enabling the attacker to write arbitrary files and potentially overwrite critical system or application files.

Affected Systems

The vulnerability affects Red Hat products that ship with GNU patch, including Red Hat Enterprise Linux 10, 9, 8, 7, 6, and Red Hat Hardened Images, as well as Red Hat Hummingbird version 1, which is used across multiple platforms. Systems running the affected patch versions are susceptible if they process untrusted patch files.

Risk and Exploitability

The CVSS score of 5.5 indicates a moderate severity. No EPSS score is available, but the KEV catalog does not list this vulnerability. Exploitation requires an attacker to cause a user or automated workflow to apply a specially crafted patch. The attack is local; it does not provide remote code execution but can lead to integrity problems by writing files with the executing user’s privileges. Careful control of patch files and execution contexts is essential to mitigate this risk.

Remediation

Vendor Workaround

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.


OpenCVE Recommended Actions

  • Validate incoming patch files to reject any that contain absolute paths or path traversal sequences; this defences against the path traversal weakness (CWE-22).
  • Run the patch utility in a sandbox or under a non‑privileged user so that, even if an absolute path slips through, the process cannot alter critical areas of the system.
  • Keep GNU patch updated to a version that includes the official fix; if a patch release is not yet available, monitor Red‑Hat advisories for updates.

Generated by OpenCVE AI on October 22, 2026 at 12:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4945-1 patch security update
History
Type Values Removed Values Added
CPEs cpe:/a:redhat:enterprise_linux:9 cpe:/o:redhat:enterprise_linux:9
Type Values Removed Values Added
CPEs cpe:/a:redhat:enterprise_linux:10 cpe:/o:redhat:enterprise_linux:10.3
References
Type Values Removed Values Added
First Time appeared Redhat enterprise Linux Eus
CPEs cpe:/o:redhat:enterprise_linux_eus:10.2
Vendors & Products Redhat enterprise Linux Eus
References
Type Values Removed Values Added
First Time appeared Redhat rhel Eus
CPEs cpe:/a:redhat:rhel_eus:9.8::appstream
Vendors & Products Redhat rhel Eus
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:enterprise_linux:8 cpe:/o:redhat:enterprise_linux:8::baseos
References
Type Values Removed Values Added
First Time appeared Redhat rhel Els
CPEs cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
cpe:/a:redhat:enterprise_linux:10
cpe:/a:redhat:enterprise_linux:8
cpe:/a:redhat:enterprise_linux:9
cpe:/o:redhat:rhel_els:6
cpe:/o:redhat:rhel_els:7
Vendors & Products Redhat rhel Els
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Red Hat
Red Hat enterprise Linux
Redhat hardened Images
Vendors & Products Red Hat
Red Hat enterprise Linux
Redhat hardened Images
Type Values Removed Values Added
Description A flaw was found in GNU patch. An attacker can achieve arbitrary file creation outside the intended working directory by enticing a user or automated workflow to apply a specially crafted patch file. Due to missing validation during automatic patch reversal, absolute file paths in patch headers are accepted rather than rejected. Consequently, the utility can create files in arbitrary locations with the permissions of the executing user.
Title Patch: filename validation bypass in reversal fallback allows file creation outside the working directory
First Time appeared Redhat
Redhat enterprise Linux
Redhat hummingbird
Weaknesses CWE-22
CPEs cpe:/a:redhat:hummingbird:1
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Redhat hummingbird
References
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Nov 28, 2026, 12:11 AM
Reserved
Oct 22, 2026, 7:11 AM
Status
Awaiting Analysis
Published
Oct 22, 2026, 11:17 AM
Modified
Nov 28, 2026, 1:16 AM
Severity
Moderate
Public date
Oct 22, 2026, 7:48 AM