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.
Published: 2026-10-22
Score: 5.5 Medium
EPSS: n/a
KEV: No
Impact: Arbitrary File Creation
Action: Assess Impact
AI Analysis

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.

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

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

No advisories yet.

History

Thu, 22 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 22 Oct 2026 10:30:00 +0000

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'}


Subscriptions

Redhat Enterprise Linux Hummingbird
cve-icon MITRE

Status: PUBLISHED

Assigner: redhat

Published:

Updated: 2026-10-22T10:16:12.930Z

Reserved: 2026-10-22T07:11:53.976Z

Link: CVE-2026-115207

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-22T11:17:50.537

Modified: 2026-10-22T15:25:35.333

Link: CVE-2026-115207

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-22T07:48:00Z

Links: CVE-2026-115207 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T12:30:05Z

Weaknesses
  • CWE-22

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