NULL Pointer Dereference in GNU patch
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-476.
Summary
GNU patch is vulnerable to a NULL pointer dereference when processing a specially crafted unified-diff patch file. Improper handling of consecutive end-of-file newline markers can corrupt internal hunk (single block of changes in diff) data structures, causing the application to pass a NULL pointer to fwrite() during patch processing. An attacker can trigger this condition with a malicious patch file, causing the utility to crash and resulting in a denial of service. This issue has been fixed in the commit e6d6a4e021660679d7fc9150f981d4920f722313
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Red Hat 1 advisory
- RHSA-2026:38019 Released 2026-07-10 · Red Hat rating ModerateRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images patch-2.8-4.3.hum1@aarch64, patch-2.8-4.3.hum1@src, patch-2.8-4.3.hum1@x86_64
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Hardened Images | Fixed | RHSA-2026:38019 |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-56288
- 2026-10-03 Alias added: GHSA-m3j2-9m66-r96h
References
More GNU Patch vulnerabilities
- TI-2015-01271 Directory traversal vulnerability in GNU patch versions which support Git-style patching… CVSS 3.0HIGH 7.5
- TI-2018-05076 A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6. CVSS 3.0HIGH 7.5
- TI-2018-05075 An issue was discovered in GNU patch through 2.7.6. CVSS 3.0HIGH 7.5
- TI-2018-15808 GNU Patch version 2.7.6 contains an input validation vulnerability when processing patch… CVSS 3.0HIGH 7.8
- TI-2019-10248 GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited… CVSS 3.0HIGH 7.8
- TI-2018-14931 do_ed_script in pch.c in GNU patch through 2.7.6 does not block strings beginning with a… CVSS 3.0HIGH 7.8
Sources
- CVE-2026-56288 · CVE Program
- CVE-2026-56288 · NVD
- FIRST EPSS
- GHSA-m3j2-9m66-r96h · GitHub Advisory Database · CC BY 4.0
- CVE-2026-56288 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences