CVE-2026-40553

Stack-based buffer overflow in gawk

Published Jul 13, 2026 CVSS 4.0 · 5.1 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

A stack-based buffer overflow exists in the ftype() routine of GNU Gawk, triggered while processing the extension/readdir.c program file. The overflow can cause the program to crash and, according to the advisory, may also lead to arbitrary code execution, although the feasibility of this has not been confirmed. The weakness is a classic stack buffer overflow, classified as CWE-121.

Affected Systems

GNU Gawk versions 5.4.0 and earlier are affected. Users running these versions should verify the installed gawk against the affected range.

Risk and Exploitability

The CVSS score of 5.1 places the vulnerability on the moderate side, and the EPSS score of less than 1% indicates a very low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog. Based on the description, the likely attack vector is local or via untrusted input files processed by gawk, as the overflow originates from handling readdir data. Since code execution has not been confirmed, the risk is primarily a denial of service with a potential, but unverified, code execution risk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update GNU Gawk to a version that includes the fix (e.g., 5.4.1 or later).
  • If an update is not yet available, restrict usage of gawk to trusted scripts and input data, and consider sandboxing or disabling functionality that processes external directories.
  • Monitor system logs for unexpected gawk crashes and apply patches as soon as they are released.

Generated by OpenCVE AI on July 31, 2026 at 11:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8588-1 Gawk vulnerabilities
History
Type Values Removed Values Added
First Time appeared Gnu
Gnu gawk
Vendors & Products Gnu
Gnu gawk
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Stack-based buffer overflow in gawk
Weaknesses CWE-121
References
Metrics cvssV4_0

{'score': 5.1, 'vector': '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'}

Weaknesses
  • CWE-121

    Stack-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
CERT-PL
Published
Updated
Jul 13, 2026, 1:00 PM
Reserved
Apr 14, 2026, 9:44 AM
Status
Analyzed
Published
Jul 13, 2026, 1:16 PM
Modified
Oct 24, 2026, 10:10 PM