GNU gawk
CVE-2026-40553
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local system access
-
DeliveryInvoke gawk with readdir extension enabled
-
ExploitSupply crafted directory input targeting ftype()
-
ExecutionOverflow stack-allocated buffer
-
ImpactCrash gawk process or attempt control-flow hijack
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack buffer bounds checking
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires local access to a system running gawk 5.4.0 or below with the readdir extension compiled and in active use. The ftype() routine must be reached, which occurs when gawk processes directory entries through that extension. The CVSS 4.0 vector (PR:N) indicates no elevated privileges are required - any user able to execute gawk and supply crafted input can trigger the overflow. Code execution feasibility is limited by stack hardening mitigations (canaries, ASLR, NX) and has not been demonstrated. Remote exploitation is not applicable per the AV:L vector; a network-exposed attack path would require an intermediary service that invokes gawk on attacker-controlled input. |
| Impact | The CVSS 4.0 score of 5.1 with AV:L reflects a strictly local attack surface, which substantially limits real-world exposure compared to network-reachable vulnerabilities. Integrity and availability impacts are rated low (VI:L, VA:L), and there is no confidentiality impact (VC:N). The provided vector records low subsequent-system impact (SC:L/SI:L/SA:L), plausible when gawk is embedded in automated or privileged pipeline scripts whose failure cascades to downstream processes. No EPSS data was supplied, and KEV status is absent from the input, indicating no confirmed active exploitation. The RCE tag is present but explicitly unconfirmed by CERT-PL, so the operational risk should be treated as crash-level until evidence of code execution emerges. The combination of local-only attack vector, low individual impact ratings, and unconfirmed RCE makes this a low-to-moderate urgency finding for most organizations; systems where gawk processes untrusted input inside privileged or automated contexts warrant faster remediation. |
| Exploit ScenarioDerived | A local user supplies crafted directory input or invokes a gawk script that exercises the readdir extension's ftype() routine, triggering a write past the stack buffer boundary. In the most reliably demonstrated outcome, this crashes the gawk process and disrupts any pipeline depending on it. In a more sophisticated attempt leveraging favorable stack layout or absent hardening, an attacker might attempt to redirect execution, though this code-execution path has not been confirmed as feasible by the researcher. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 13, 2026
Stack-based buffer overflow in gawk's readdir extension (extension/readdir.c, ftype() routine) affects all gawk releases through version 5.4.0, enabling a local attacker to crash the process and theoretically achieve code execution. The RCE angle is explicitly unconfirmed by the reporter (CERT-PL), making denial-of-service the primary demonstrated impact at this time. No public exploit identified at time of analysis; an upstream source-level patch commit is available on GNU Savannah.
RemediationAI
Monitor your Linux distribution's package feed for an updated gawk package that incorporates the upstream fix commit (https://cgit.git.savannah.gnu.org/cgit/gawk.git/commit/?id=cca0366144336b49aaa7d5d949966ce8e2c70843) and apply it as soon as available. The CERT-PL advisory at https://cert.pl/en/posts/2026/07/CVE-2026-40467 should be reviewed for any additional researcher guidance. If a packaged update is not yet available and gawk is used to process externally-supplied or untrusted directory paths, consider restricting execution of gawk in those pipelines as a compensating control - be aware that disabling readdir-extension-dependent scripts will break any gawk programs that enumerate directories using that extension. No exact patched release version number was confirmed in the available data; do not infer a specific version beyond what is stated here.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
gawk is the GNU Project's implementation of the AWK text-processing language, shipped by default on virtually every major Linux distribution. CWE-121 (Stack-based Buffer Overflow) identifies the root cause: the ftype() function inside extension/readdir.c writes data beyond the bounds of a stack-allocated buffer. The readdir extension provides directory-traversal capabilities to gawk scripts, and ftype() classifies filesystem entry types within that extension. Because the overflowed buffer resides on the stack, adjacent frame data - including saved return addresses - may be corrupted, creating the theoretical potential for control-flow hijack. This path is constrained in practice by modern mitigations such as stack canaries, ASLR, and NX. CPE cpe:2.3:a:gnu:gawk:*:*:*:*:*:*:*:* covers all gawk variants through 5.4.0.
Know when Gawk gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:L/SI:L/SA:L
Local vector because gawk is a CLI tool; PR:N since any local user can run it; no confidentiality impact; low integrity and availability from crash and potential stack corruption.
Primary rating from Vendor (CERT-PL).
CVSS VectorVendor: CERT-PL
DescriptionCVE.org
Buffer overflow vulnerability has been found in "extension/readdir.c" program file of gawk (ftype() routine). This issue could be used to crash the program and potentially to achieve code execution, although the latter has not been confirmed to be feasible. It affects gawk in versions 5.4.0 and below.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. Rated high severity (CVSS 7.1), this vulnerab
Integer overflow in gawk's do_sub() routine (builtin.c) enables heap metadata corruption on 32-bit builds, crashing the
Use-after-free memory corruption in gawk's do_getline_redir() routine within io.c allows a local attacker to crash the g
Integer overflow in GNU gawk's builtin.c (versions 5.4.0 and below) enables heap metadata corruption and memory exhausti
Same weakness CWE-121 – Stack-based Buffer Overflow
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Micro 5.3 | Affected |
| SUSE Linux Enterprise Micro 5.4 | Affected |
| SUSE Linux Enterprise Micro 5.5 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Micro 6.2 | Affected |
| SLES15-SP5-CHOST-BYOS-SAP-CCloud | Affected |
| SLES15-SP6-CHOST-BYOS | Affected |
| SLES15-SP6-CHOST-BYOS-Aliyun | Affected |
| SLES15-SP6-CHOST-BYOS-Azure | Affected |
| SLES15-SP6-CHOST-BYOS-EC2 | Affected |
| SLES15-SP6-CHOST-BYOS-GCE | Affected |
| SLES15-SP6-CHOST-BYOS-GDC | Affected |
| SLES15-SP6-CHOST-BYOS-SAP-CCloud | Affected |
| SLES15-SP7-CHOST-BYOS-Aliyun | Affected |
| SLES15-SP7-CHOST-BYOS-Azure | Affected |
| SLES15-SP7-CHOST-BYOS-EC2 | Affected |
| SLES15-SP7-CHOST-BYOS-GCE | Affected |
| SLES15-SP7-CHOST-BYOS-GDC | Affected |
| SLES15-SP7-CHOST-BYOS-SAP-CCloud | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Affected |
| SUSE Linux Enterprise Micro 5.3 | Affected |
| SUSE Linux Enterprise Micro 5.4 | Affected |
| SUSE Linux Enterprise Micro 5.5 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Micro 6.0 | Affected |
| SUSE Linux Micro 6.1 | Affected |
| SUSE Linux Micro 6.2 | Affected |
| openSUSE Leap 16.0 | Affected |
| SLES15-SP3-CHOST-BYOS-Aliyun | Affected |
| SLES15-SP3-CHOST-BYOS-Azure | Affected |
| SLES15-SP3-CHOST-BYOS-EC2 | Affected |
| SLES15-SP3-CHOST-BYOS-GCE | Affected |
| SLES15-SP3-CHOST-BYOS-SAP-CCloud | Affected |
| SLES15-SP4-CHOST-BYOS | Affected |
| SLES15-SP4-CHOST-BYOS-Aliyun | Affected |
| SLES15-SP4-CHOST-BYOS-Azure | Affected |
| SLES15-SP4-CHOST-BYOS-EC2 | Affected |
| SLES15-SP4-CHOST-BYOS-GCE | Affected |
| SLES15-SP4-CHOST-BYOS-SAP-CCloud | Affected |
| SLES15-SP5-CHOST-BYOS-Aliyun | Affected |
| SLES15-SP5-CHOST-BYOS-Azure | Affected |
| SLES15-SP5-CHOST-BYOS-EC2 | Affected |
| SLES15-SP5-CHOST-BYOS-GCE | Affected |
| SLES15-SP5-CHOST-BYOS-GDC | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP6 | Affected |
| SUSE Linux Enterprise Server 12 SP5 | Affected |
| SUSE Linux Enterprise Server 12 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 12 SP5-LTSS Extended Security | Affected |
| SUSE Linux Enterprise Server 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5 | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Proxy LTS 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Retail Branch Server LTS 4.3 | Affected |
| SUSE Manager Server 4.3 | Affected |
| SUSE Manager Server LTS 4.3 | Affected |
| SUSE CaaS Platform 3.0 | Affected |
| SUSE CaaS Platform 4.0 | Affected |
| SUSE Enterprise Storage 6 | Affected |
| SUSE Enterprise Storage 7 | Affected |
| SUSE Enterprise Storage 7.1 | Affected |
| SUSE Linux Enterprise Desktop 12 | Affected |
| SUSE Linux Enterprise Desktop 12 SP1 | Affected |
| SUSE Linux Enterprise Desktop 12 SP2 | Affected |
| SUSE Linux Enterprise Desktop 12 SP3 | Affected |
| SUSE Linux Enterprise Desktop 12 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 | Affected |
| SUSE Linux Enterprise Desktop 15 SP1 | Affected |
| SUSE Linux Enterprise Desktop 15 SP2 | Affected |
| SUSE Linux Enterprise Desktop 15 SP3 | Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15-LTSS | Affected |
| SUSE Linux Enterprise Micro 5.0 | Affected |
| SUSE Linux Enterprise Micro 5.1 | Affected |
| SUSE Linux Enterprise Micro 5.2 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP1 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP2 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP3 | Affected |
| SUSE Linux Enterprise Point of Sale 12 SP2-CLIENT | Affected |
| SUSE Linux Enterprise Real Time 15 SP2 | Affected |
| SUSE Linux Enterprise Real Time 15 SP3 | Affected |
| SUSE Linux Enterprise Real Time 15 SP4 | Affected |
| SUSE Linux Enterprise Server 12 | Affected |
| SUSE Linux Enterprise Server 12 SP1 | Affected |
| SUSE Linux Enterprise Server 12 SP1-LTSS | Affected |
| SUSE Linux Enterprise Server 12 SP2 | Affected |
| SUSE Linux Enterprise Server 12 SP2-BCL | Affected |
| SUSE Linux Enterprise Server 12 SP2-ESPOS | Affected |
| SUSE Linux Enterprise Server 12 SP2-LTSS | Affected |
| SUSE Linux Enterprise Server 12 SP3 | Affected |
| SUSE Linux Enterprise Server 12 SP3-BCL | Affected |
| SUSE Linux Enterprise Server 12 SP3-ESPOS | Affected |
| SUSE Linux Enterprise Server 12 SP3-LTSS | Affected |
| SUSE Linux Enterprise Server 12 SP4 | Affected |
| SUSE Linux Enterprise Server 12 SP4-ESPOS | Affected |
| SUSE Linux Enterprise Server 12 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 12-LTSS | Affected |
| SUSE Linux Enterprise Server 15 | Affected |
| SUSE Linux Enterprise Server 15 SP1 | Affected |
| SUSE Linux Enterprise Server 15 SP1-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP1-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP2 | Affected |
| SUSE Linux Enterprise Server 15 SP2-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP2-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP3 | Affected |
| SUSE Linux Enterprise Server 15 SP3-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP3-LTSS | Affected |
| SUSE Linux Enterprise Server 15-LTSS | Affected |
| SUSE Linux Enterprise Server for Raspberry Pi 12 SP2 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP2 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP3 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP2 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP3 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Manager Proxy 4.0 | Affected |
| SUSE Manager Proxy 4.1 | Affected |
| SUSE Manager Proxy 4.2 | Affected |
| SUSE Manager Retail Branch Server 4.0 | Affected |
| SUSE Manager Retail Branch Server 4.1 | Affected |
| SUSE Manager Retail Branch Server 4.2 | Affected |
| SUSE Manager Server 4.0 | Affected |
| SUSE Manager Server 4.1 | Affected |
| SUSE Manager Server 4.2 | Affected |
| SUSE OpenStack Cloud 7 | Affected |
| SUSE OpenStack Cloud 8 | Affected |
| SUSE OpenStack Cloud 9 | Affected |
| SUSE OpenStack Cloud Crowbar 8 | Affected |
| SUSE OpenStack Cloud Crowbar 9 | Affected |
| openSUSE Leap 15.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
| openSUSE Leap Micro 5.2 | Affected |
| openSUSE Leap Micro 5.3 | Affected |
| openSUSE Leap Micro 5.4 | Affected |
| openSUSE Leap Micro 5.5 | Affected |
| SLES-CHOST-BYOS-Aliyun | Affected |
| SLES-CHOST-BYOS-Azure | Affected |
| SLES-CHOST-BYOS-EC2 | Affected |
| SLES-CHOST-BYOS-GCE | Affected |
| SLES-CHOST-BYOS-GDC | Affected |
| SLES-CHOST-BYOS-SAP-CCloud | Affected |
| bci/bci-sle15-kernel-module-devel bci/bci-sle15-kernel-module-devel:15.5 bci/bci-sle15-kernel-module-devel:15.6 bci/gcc bci/golang bci/golang:1.23 bci/golang:1.23-openssl bci/golang:1.25 bci/golang:1.25-openssl bci/kiwi bci/node:18 bci/node:20 bci/node:22 bci/openjdk bci/openjdk:11 bci/openjdk:17 bci/openjdk:21 bci/python bci/python:3 bci/ruby bci/ruby:2 bci/spack bci/spack:0.23 containers/apache-pulsar:3.3 containers/open-webui-pipelines:0 containers/python:3.11 containers/python:3.9 kiwi-templates-Minimal kiwi-templates-Minimal-Cloud-sap kiwi-templates-Minimal-MS-HyperV-sap kiwi-templates-Minimal-VMware-sap kiwi-templates-Minimal-kvm-and-xen-sap rancher/elemental-teal-iso/5.4 rancher/elemental-teal-rt/5.3 rancher/elemental-teal-rt/5.4 rancher/elemental-teal/5.3 rancher/elemental-teal/5.4 rancher/seedimage-builder ses/6/cephcsi/cephcsi ses/6/rook/ceph ses/7.1/cephcsi/cephcsi ses/7.1/rook/ceph ses/7/cephcsi/cephcsi ses/7/rook/ceph suse/hpc/warewulf4-x86_64/sle-hpc-node suse/kiosk/firefox-esr suse/kiosk/firefox-esr:esr suse/kiosk/xorg-client suse/manager/4.3/proxy-httpd suse/manager/5.0/x86_64/proxy-httpd suse/manager/5.0/x86_64/server suse/mariadb suse/mariadb:10.11 suse/multi-linux-manager/5.1/x86_64/proxy-httpd suse/multi-linux-manager/5.1/x86_64/proxy-salt-broker suse/multi-linux-manager/5.1/x86_64/server suse/multi-linux-manager/5.2/x86_64/proxy-httpd suse/multi-linux-manager/5.2/x86_64/server suse/nginx suse/nginx:1.21 suse/pcp suse/pcp:5 suse/pcp:6 suse/rmt-mariadb suse/sle-micro-rancher/5.2 suse/sle-micro-rancher/5.3 suse/sle-micro-rancher/5.4 suse/sle-micro/5.0/toolbox suse/sle-micro/5.1/toolbox suse/sle-micro/5.2/toolbox suse/sle-micro/5.3/toolbox suse/sle-micro/5.4/toolbox suse/sle-micro/5.5 suse/sle-micro/5.5/toolbox suse/sle-micro/base-5.5 suse/sle-micro/kvm-5.5 suse/sle-micro/rt-5.5 suse/sles/15.3/libguestfs-tools:0.45.0 suse/sles/15.4/libguestfs-tools:0.49.0 suse/sles/15.5/libguestfs-tools:0.58.0 suse/sles/15.5/virt-launcher:0.58.0 suse/sles/15.6/libguestfs-tools:1.1.1 suse/sles/15.6/virt-launcher:1.1.1 suse/sles/15.7/libguestfs-tools:1.5.0 suse/sles/15.7/virt-launcher:1.5.0 suse/sles/16.0/toolbox suse/sles12sp3 third-party/nvidia/driver:550-sles15.7 third-party/nvidia/driver:550.163.01-sles15.7 third-party/nvidia/driver:570-sles15.7 third-party/nvidia/driver:570.195.03-sles15.7 third-party/nvidia/driver:570.211.01-sles15.7 third-party/nvidia/driver:575-sles15.7 third-party/nvidia/driver:575.57.08-sles15.7 third-party/nvidia/driver:580-sles15.7 third-party/nvidia/driver:580.105.08-sles15.7 third-party/nvidia/driver:580.126.09-sles15.7 third-party/nvidia/driver:580.126.16-sles15.7 third-party/nvidia/driver:580.126.20-sles15.7 third-party/nvidia/driver:580.82.07-sles15.7 third-party/nvidia/driver:580.95.05-sles15.7 third-party/nvidia/driver:590-sles15.7 third-party/nvidia/driver:590.48.01-sles15.7 third-party/nvidia/driver:595-sles15.7 third-party/nvidia/driver:595.45.04-sles15.7 third-party/nvidia/driver:595.58.03-sles15.7 | Affected |
NVD
CVE.org
EPSS
Vulnrichment
VulDB
GitHub PoC
Exploit-DB