Skip to main content

GNU gawk CVE-2026-40469

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

Attack ChainAIDerived

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

  1. Access
    Identify 32-bit gawk deployment
  2. Delivery
    Craft malicious sub()/gsub() input
  3. Exploit
    Supply input to vulnerable gawk process
  4. Execution
    Trigger integer overflow in do_sub()
  5. Persist
    Corrupt heap metadata
  6. Impact
    Crash gawk process

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 a 32-bit compiled build of gawk at version 5.4.0 or below - 64-bit builds are architecturally immune regardless of version. The vulnerable code path is the do_sub() substitution routine, triggered when a gawk script executes sub() or gsub() on attacker-influenced input. Per the CVSS 4.0 vector (PR:N, UI:N), no authentication and no user interaction are required beyond the ability to supply crafted data to the gawk process. The crash impact is confined to the gawk process itself (VA:L, SC/SI/SA all N), limiting damage to the availability of that specific invocation. Exploitation is bounded by the narrow 32-bit deployment population and the requirement to reach a gawk process with controllable input; it cannot affect 64-bit systems or gawk versions above 5.4.0.

Impact

The CVSS 4.0 score of 5.1 with vector AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N appropriately reflects a low-severity, availability-only, locally triggered issue. The attack complexity is low and no privileges or user interaction are required, but the local attack vector (AV:L) fundamentally limits exposure - an attacker must be able to deliver crafted input to a running gawk process on the target system. The architectural constraint to 32-bit builds is the most significant risk-reduction factor: the overwhelming majority of modern production Linux and Unix deployments run 64-bit kernels and userspace, dramatically shrinking the real-world exposure surface. No CISA KEV listing and no public POC exist, corroborating a low active-exploitation probability. EPSS data was not provided, but given the narrow scope (32-bit only, crash-only impact, local vector), this is a low-priority issue for most environments - primarily relevant to embedded systems, legacy appliances, or IoT devices running 32-bit Linux with gawk installed.

Exploit ScenarioDerived

An attacker or malicious script supplies specially crafted substitution input to a 32-bit gawk process - for example, piping data into a gawk script that invokes sub() or gsub() - triggering the integer overflow in do_sub(), which corrupts heap metadata and causes gawk to crash. In an automated text-processing pipeline running on a 32-bit Linux system, this could interrupt batch jobs or log-analysis workflows. No public exploit code has been identified, and the local attack vector requires the ability to influence the input data reaching the gawk process.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.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 gawk's do_sub() routine (builtin.c) enables heap metadata corruption on 32-bit builds, crashing the process. Affecting all gawk versions through 5.4.0 compiled for 32-bit architectures, this flaw was reported by CERT-PL and is limited exclusively to the availability domain - the CVSS 4.0 vector confirms no confidentiality or integrity impact. No public exploit code or active exploitation has been identified at time of analysis, and a patch commit is available upstream.

RemediationAI

The primary fix is to apply the upstream patch commit available at https://cgit.git.savannah.gnu.org/cgit/gawk.git/commit/?id=ae1b2d508f46913269a9e62aceda3636afe8147b. Because no specific patched release version has been confirmed in available data, users should either build gawk from the patched source tree or await a distribution-packaged update. As a structural workaround, migrating any 32-bit gawk deployment to a 64-bit build fully eliminates this specific vulnerability due to the architectural constraint - this is the most effective interim mitigation with no functional trade-off where 64-bit is available. In environments where 32-bit gawk processes untrusted or externally supplied input (e.g., log-processing pipelines, automation scripts), restrict the input source or sandbox the gawk process (e.g., via systemd sandboxing or container isolation) to limit the availability impact of a crash until patched binaries are deployed.

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 is the GNU Project's canonical AWK interpreter, widely shipped in Linux distributions and Unix-like systems for text processing. The vulnerability resides in the do_sub() function within builtin.c, which implements gawk's sub() and gsub() substitution built-ins. CWE-190 (Integer Overflow or Wraparound) identifies the root cause: on 32-bit platforms, pointer arithmetic or size computations in do_sub() can exceed 32-bit integer bounds, producing incorrect memory offsets that allow heap metadata and adjacent gawk objects to be overwritten. On 64-bit builds the wider integer space prevents this wraparound, which is why the vulnerability is architecture-scoped. The affected CPE is cpe:2.3:a:gnu:gawk:*:*:*:*:*:*:*:* with a version ceiling of 5.4.0.

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 5.1 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 4.0 MEDIUM

Local vector because gawk processes input on the local system; PR:N since any user can invoke gawk with crafted input; impact is crash-only so A:L, C:N, I:N.

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

Primary rating from Vendor (CERT-PL).

CVSS VectorVendor: CERT-PL

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

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 88% exploitable
Prevalence
Medium
standard AWK interpreter shipped across most Linux/Unix distributions
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment MSRC Vendor CIRCL VulDB

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

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

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

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

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Affected
SLES15-SP6-CHOST-BYOS Affected
SLES15-SP6-CHOST-BYOS-Aliyun Affected
SLES15-SP6-CHOST-BYOS-Azure Affected
SLES15-SP6-CHOST-BYOS-EC2 Affected

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