Skip to main content

GNU gawk CVE-2026-40468

LOW
Integer Overflow or Wraparound (CWE-190)
2026-07-13 CERT-PL
2.1
CVSS 4.0 · Vendor: CERT-PL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted numeric input
  2. Delivery
    Feed to vulnerable gawk process
  3. Exploit
    Trigger integer overflow in builtin.c
  4. Execution
    Corrupt heap allocation metadata
  5. Persist
    Overwrite heap objects with attacker bytes
  6. Impact
    Cause memory exhaustion or partial integrity compromise

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
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 that gawk processes attacker-controlled input containing carefully crafted numeric arguments capable of triggering the integer overflow in builtin.c - this is reflected by the CVSS 4.0 AT:P (Attack Requirements: Present) metric, indicating specific conditions must be met rather than a default-exploitable configuration. The attack vector is local (AV:L), meaning the malicious input must be processed on the target system, either by direct invocation of gawk by the attacker or by a local/server-side script that feeds external data into gawk. No authentication is required to run gawk (PR:N), and no user interaction is needed beyond the script or process that invokes gawk (UI:N). Exploitation is limited to gawk versions 5.4.0 and below. The primary limiting factor is the requirement for attacker-controlled numeric input to reach the vulnerable built-in function code path - systems where gawk only processes trusted, internally generated data are not realistically at risk.

Impact

Real-world risk is low to moderate in isolation but warrants patching where gawk processes untrusted external input. The CVSS 4.0 score of 2.1 reflects local-only exploitation (AV:L), the presence of attack prerequisites (AT:P), and limited impact (VI:L, VA:L, SA:L). There is no KEV listing and no public exploit code identified at time of analysis, further suppressing urgency. The risk is elevated in environments where gawk is used in automated pipelines or server-side scripts that ingest attacker-controlled data, because the local attack vector (AV:L) does not preclude remote-origin malicious input being processed locally. The heap overwrite primitive described in the advisory introduces a theoretical path to further exploitation beyond DoS, though the current scoring does not reflect code execution. EPSS data was not provided; given the low CVSS score and no public exploit, exploitation probability is presumed low. The primary risk scenario is availability disruption (memory exhaustion) rather than system compromise.

Exploit ScenarioDerived

An attacker supplies a crafted input file or stream containing specific numeric values that, when passed to a gawk built-in function, trigger an integer overflow in builtin.c. The overflowed value corrupts heap allocation size calculations, causing gawk to either exhaust memory or write attacker-controlled bytes into adjacent heap metadata. In environments where gawk is invoked by server-side scripts processing user-uploaded content, this can be triggered without direct shell access. No public exploit code identified at time of analysis.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 13, 2026

Integer overflow in GNU gawk's builtin.c (versions 5.4.0 and below) enables heap metadata corruption and memory exhaustion when gawk processes attacker-crafted input. The flaw stems from a CWE-190 integer wraparound condition that can be triggered locally to overwrite heap objects with attacker-controlled bytes, potentially escalating from a denial-of-service to memory corruption with partial integrity impact. No public exploit identified at time of analysis, and CERT-PL reported this with a low CVSS 4.0 base score of 2.1, reflecting a limited, local attack surface with specific attack prerequisites.

RemediationAI

Vendor-released patch: upstream fix committed to the GNU gawk Savannah repository (commit 062f2f2581b991362c046f7f2e238ffa34e6f8c7), available at https://cgit.git.savannah.gnu.org/cgit/gawk.git/commit/?id=062f2f2581b991362c046f7f2e238ffa34e6f8c7. Users should upgrade to a distribution-packaged release that includes this commit, or build gawk from source at a revision equal to or newer than this commit. A patched tagged release version was not independently confirmed from the available reference data. As a compensating control where patching is not immediately possible, restrict gawk-based scripts from processing untrusted external data - specifically, audit pipelines where attacker-influenced input is passed to gawk without sanitization of large numeric arguments to built-in functions. Disabling or sandboxing (e.g., via seccomp or containers) scripts that call gawk on untrusted input limits the blast radius of exploitation.

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

GNU gawk (GNU awk) is the GNU Project's implementation of the AWK text-processing language, widely installed on Linux and Unix systems as a core scripting utility. The vulnerability resides in builtin.c, the source file implementing gawk's built-in functions (e.g., length, substr, split). CWE-190 (Integer Overflow or Wraparound) describes a condition where arithmetic on integer values exceeds the type's bounds, causing the result to wrap around unexpectedly. In gawk's context, an overflowing integer used in memory allocation or indexing calculations can result in an undersized heap allocation, subsequently enabling heap metadata corruption when oversized data is written into the allocated region. The affected CPE is cpe:2.3:a:gnu:gawk:*:*:*:*:*:*:*:* covering all gawk versions through 5.4.0. The upstream fix is available via a named commit on the GNU Savannah git repository.

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

Vendor (CERT-PL) PRIMARY 2.1 LOW
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:L
vuln.today AI 4.0 MEDIUM

Local tool with attack prerequisites (AT:P maps to AC:H); any user can run gawk (PR:N); no confidentiality impact; limited integrity and availability.

3.1 AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L
4.0 AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:L

Primary rating from Vendor (CERT-PL).

CVSS VectorVendor: CERT-PL

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
Low

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 90% exploitable
Prevalence
High
default install on most Linux and Unix distributions
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

Affected Products (CPE)CVE.org

cpe:2.3:a:gnu:gawk:*:*:*:*:*:*:*:*

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