{"id":"CVE-2026-115207","title":"Patch: filename validation bypass in reversal fallback allows file creation outside the working directory","summary":"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 auto…","severity":"medium","cvss":5.5,"cvssVector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","cvssSource":"cna","cwe":["CWE-22"],"vendor":"Red Hat","product":"patch","affected":["patch (all versions)","patch","patch (all versions)","patch (all versions)","patch (all versions)","patch (all versions)"],"published":"2026-10-22","updated":"2026-10-22","sourceUpdated":"2026-10-22T10:16:12.930Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-115207","references":[{"url":"https://access.redhat.com/security/cve/CVE-2026-115207"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2558775","label":"RHBZ#2558775"}],"tags":["cve.org"],"ingestedAt":"2026-10-22T10:35:54.917Z","slug":"CVE-2026-115207","body":"## Overview\n\nA 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.\n\n## Affected\n\n- `patch (all versions)`\n- `patch`\n- `patch (all versions)`\n- `patch (all versions)`\n- `patch (all versions)`\n- `patch (all versions)`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n### Workarounds\n\nMitigation 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.","depth":"sunlit","depthScore":30,"depthScoreParts":{"impact":30.3,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}