CVE-2026-40468
Analyzed Analyzed - Analysis Complete

Integer Overflow in GNU Awk (gawk)

Vulnerability report for CVE-2026-40468, 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. This issue may lead to memory exhaustion on the hosting operating system and could be used to overwrite gawk heap metadata and objects with attacker-controlled bytes. It affects 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-40468 is an integer overflow vulnerability found in the 'builtin.c' program file of gawk (GNU Awk). This vulnerability occurs when an integer value exceeds its maximum limit due to improper handling of arithmetic operations, leading to unexpected behavior.

The issue can result in memory exhaustion on the hosting operating system. Additionally, it may allow an attacker to overwrite gawk's heap metadata and objects with attacker-controlled bytes, potentially leading to further exploitation.

This vulnerability affects gawk versions 5.4.0 and below. The fix involves modifying data types of variables to prevent overflows, as seen in the referenced commit.

Detection Guidance

Detecting this vulnerability on your system involves checking the installed version of gawk and looking for signs of exploitation or memory corruption. Since the vulnerability is an integer overflow in the 'builtin.c' file, you can use the following methods:

  • Check the installed version of gawk by running: gawk --version. If the version is 5.4.0 or below, your system is vulnerable.
  • Use AddressSanitizer (ASan) to detect memory corruption issues. Compile gawk with ASan enabled (e.g., gcc -fsanitize=address -m32) and run it with inputs that trigger the vulnerable code paths. This may reveal overflows or heap metadata corruption.
  • Monitor system logs for crashes or unusual behavior in gawk processes, as memory exhaustion or heap corruption may lead to segmentation faults or other errors.
  • Inspect network or system activity for unexpected gawk processes, especially if they are processing untrusted input data, as this could indicate exploitation attempts.
Impact Analysis

If you are using gawk versions 5.4.0 or below, this vulnerability could impact you in several ways:

  • Memory exhaustion: The integer overflow may cause the system to run out of memory, leading to crashes or degraded performance.
  • Heap metadata corruption: An attacker could exploit this vulnerability to overwrite heap metadata and objects, potentially executing arbitrary code or causing the application to behave unpredictably.
  • Security risks: If gawk is used in scripts or automated processes, this vulnerability could be leveraged to compromise the integrity of those processes or the data they handle.
Compliance Impact

This vulnerability could impact compliance with common standards and regulations in the following ways:

  • GDPR: If gawk is used to process personal data, exploitation of this vulnerability could lead to unauthorized access or corruption of that data. This may result in a breach of GDPR requirements for data protection and integrity.
  • HIPAA: For organizations handling protected health information (PHI), this vulnerability could compromise the confidentiality or integrity of PHI if gawk is part of the data processing pipeline. This may violate HIPAA's security and privacy rules.
  • General security standards: Many compliance frameworks (e.g., ISO 27001, NIST) require organizations to maintain secure systems and address vulnerabilities promptly. Failure to patch this vulnerability could result in non-compliance with these standards.
Mitigation Strategies

To mitigate this vulnerability, follow these immediate steps:

  • Upgrade gawk to the latest version (5.4.1 or later) as soon as possible. The vulnerability was addressed in subsequent releases, and upgrading will eliminate the risk.
  • If upgrading is not immediately feasible, restrict the use of gawk to trusted input sources only. Avoid processing untrusted or maliciously crafted input files with gawk.
  • Apply temporary workarounds, such as using alternative tools (e.g., awk implementations from other projects) that are not affected by this vulnerability.
  • Monitor systems for signs of exploitation, such as unexpected crashes or memory exhaustion, and isolate affected systems if necessary.
  • Review the commit fix in Resource 1 to understand the specific changes made to address the vulnerability. This may help in manually patching the affected code if an upgrade is not possible.

Chat Assistant

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

EPSS Chart