Skip to main content

GNU gawk CVE-2026-40553

MEDIUM
Stack-based Buffer Overflow (CWE-121)
2026-07-13 CERT-PL
5.1
CVSS 4.0 · Vendor: CERT-PL
Share

Severity by source

Vendor (CERT-PL) PRIMARY
5.1 MEDIUM
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
5.1 MEDIUM

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.

3.1 AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
4.0 AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
SUSE
MEDIUM
qualitative
Red Hat
6.2 MEDIUM
qualitative

Primary rating from Vendor (CERT-PL).

CVSS VectorVendor: CERT-PL

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

2
Analysis Generated
Jul 13, 2026 - 13:18 vuln.today
CVE Published
Jul 13, 2026 - 12:07 cve.org
MEDIUM 5.1

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.

AnalysisAI

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.

Technical ContextAI

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.

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.

Vendor 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

Share

CVE-2026-40553 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy