CVE-2026-40469
Analyzed Analyzed - Analysis Complete

Integer Overflow in Gawk Heap Metadata

Vulnerability report for CVE-2026-40469, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-13

Last updated on: 2026-07-14

Assigner: CERT.PL

Description

Integer overflow vulnerability has been found in "builtin.c" program file of gawk (do_sub() routine). This issue could be used to overwrite gawk heap metadata and objects causing the program to crash. It affects 32-bit builds of gawk in versions 5.4.0 and below.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-13
Last Modified
2026-07-14
Generated
2026-08-02
AI Q&A
2026-07-14
EPSS Evaluated
2026-08-01
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
fossies gawk to 5.4.0 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-190 The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-40469 is an integer overflow vulnerability found in the `builtin.c` file of the GNU Awk (gawk) program, specifically in the `do_sub()` routine. This vulnerability affects 32-bit builds of gawk versions 5.4.0 and below.

An integer overflow occurs when a calculation produces a value that exceeds the storage capacity of the data type, leading to unexpected behavior. In this case, the overflow could be exploited to overwrite heap metadata and objects in gawk, causing the program to crash or potentially allowing further exploitation.

  • The vulnerability is triggered in the `do_sub()` function, which is responsible for string substitution operations.
  • The issue is mitigated in later versions by adding checks to detect overflow conditions before they cause memory corruption.
Detection Guidance

To detect the CVE-2026-40469 vulnerability on your system, you can check the version of gawk installed, as it affects 32-bit builds of gawk versions 5.4.0 and below. The vulnerability is specific to the do_sub() routine in the builtin.c file.

  • Check the gawk version: Run the command 'gawk --version' to verify the installed version. If it is 5.4.0 or below and you are using a 32-bit build, the system may be vulnerable.
  • Inspect the system architecture: Use the command 'uname -m' or 'getconf LONG_BIT' to confirm if the system is running a 32-bit environment.

There are no specific network-based detection methods for this vulnerability, as it is a local integer overflow issue triggered by crafted input to the gawk program.

Impact Analysis

The impact of CVE-2026-40469 depends on how you use gawk and the environment in which it operates:

  • If you are running a 32-bit version of gawk (5.4.0 or below), an attacker could exploit this vulnerability to cause the program to crash. This could lead to denial-of-service (DoS) conditions in applications or scripts that rely on gawk.
  • While the CVSS v4.0 score (5.1) suggests a moderate impact, the CVSS v3.1 score (9.1) indicates a critical severity, implying potential for high impact under certain conditions (e.g., network-based attacks if gawk is exposed to untrusted input).
  • In scenarios where gawk processes untrusted input (e.g., user-provided data or files), the vulnerability could be leveraged to corrupt memory, though the exact exploitability for arbitrary code execution is not confirmed in the provided context.

To mitigate the risk, users should upgrade to a patched version of gawk (e.g., 5.4.1 or later) or avoid processing untrusted input with vulnerable versions.

Compliance Impact

The impact of CVE-2026-40469 on compliance with standards and regulations depends on the context in which gawk is used:

  • **GDPR (General Data Protection Regulation):** If gawk is used to process personal data of EU citizens and the vulnerability leads to a crash or memory corruption, it could result in data loss, unauthorized access, or disruption of data processing activities. This may violate GDPR principles such as integrity and confidentiality (Article 5(1)(f)) or the requirement to implement appropriate security measures (Article 32).
  • **HIPAA (Health Insurance Portability and Accountability Act):** In healthcare environments, if gawk is used to handle protected health information (PHI) and the vulnerability is exploited, it could lead to unauthorized disclosure or corruption of PHI. This would violate the HIPAA Security Rule, which mandates safeguards to protect electronic PHI (ePHI).
  • **Other Standards (e.g., ISO 27001, NIST):** The vulnerability could be seen as a failure to maintain secure systems, as required by frameworks like ISO 27001 (A.12.2.1) or NIST SP 800-53 (SI-2). Organizations may need to patch the vulnerability to demonstrate compliance with vulnerability management requirements.

To ensure compliance, organizations should assess whether gawk is used in regulated environments, apply patches or mitigations, and document their risk management processes.

Mitigation Strategies

To mitigate CVE-2026-40469, follow these steps:

  • Upgrade gawk to the latest version: The vulnerability was addressed in later versions of gawk. Update to a version higher than 5.4.0, such as 5.4.1 or later, if available.
  • Apply the patch: If upgrading is not immediately possible, apply the patch referenced in Resource 2, which adds overflow checks to the do_sub() function in builtin.c.
  • Use 64-bit builds: If feasible, switch to a 64-bit build of gawk, as the vulnerability specifically affects 32-bit builds.
  • Restrict gawk usage: Limit the use of gawk scripts that process untrusted input, especially those involving string substitution functions that could trigger the overflow.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-40469. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart