Skip to main content

lwext4 CVE-2026-138370

| EUVDEUVD-2026-137769 MEDIUM
Out-of-bounds Write (CWE-787)
2026-11-29 VulnCheck GHSA-c7m3-5qc6-h5jq
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Craft malicious ext4 image
  2. Delivery
    Deliver image to victim host
  3. Exploit
    Application mounts image via lwext4
  4. Execution
    Crafted superblock yields group_blocks above INT_MAX
  5. Persist
    start_bit goes negative in bitmap init
  6. Impact
    Out-of-bounds heap write crashes mounting application

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the attacker to supply a crafted ext4 image and have a victim application built on lwext4 (through 1.0.0) mount/parse it; the trigger is in ext4_fs_init_block_bitmap() → ext4_fs_mark_bitmap_end(), where attacker-controlled superblock fields (blocks count, first_data_block, blocks_per_group) produce a group_blocks value above INT_MAX, driving start_bit negative and writing far past the block-bitmap buffer. Limiting factors that reduce real-world risk: the attack vector is LOCAL (AV:L) and demands passive user interaction (UI:P) - a victim must actually open the malicious image - so there is no remote, unauthenticated, default-config exposure; the demonstrated impact is a crash (availability) of the mounting process. Only systems that parse untrusted ext4 images with an unpatched lwext4 are exposed.

Impact

This is a moderate, defense-in-depth priority rather than an emergency. The supplied CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H) describes a LOCAL vector that requires passive user interaction - the victim must mount/parse an attacker-supplied ext4 image - and the dominant impact is availability (VA:H, a crash) with only limited integrity impact (VI:L) and no confidentiality impact (VC:N). The vuln.today decision label is 'this_month', not act_now or emergency, which is consistent with the local vector and crash-dominant impact. No KEV listing is present, so there is no confirmed active exploitation; no EPSS score was supplied, so statistical exploitation probability cannot be stated. Reporting is by VulnCheck and a public GitHub issue (#172) plus the exact vulnerable source lines are cited, so the defect is well-documented, but the input does not mark any reference as confirmed working exploit code. Net: a real bug worth patching on a normal cycle, not a high-CVSS-but-phantom issue, yet constrained by the need to deliver and have a victim mount a crafted image. Note a minor tension to verify: the base score is 6.9 while impact is described as 'crashing the mounting application' (a denial-of-service outcome), so whether heap corruption is leverageable beyond a crash is not established by the sources.

Exploit ScenarioDerived

An attacker crafts a malicious ext4 filesystem image whose superblock fields (block count / blocks-per-group) make the computed group_blocks exceed INT_MAX. When a user or service running an application built on lwext4 (through 1.0.0) mounts or parses that image, ext4_fs_mark_bitmap_end() computes a negative start_bit and writes hundreds of MiB past the bitmap buffer, corrupting the heap and crashing the process. A public GitHub issue and VulnCheck advisory document the flaw, but the input does not confirm working exploit code - no public exploit identified at time of analysis.

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 – Nov 29, 2026

Heap memory corruption in lwext4 through 1.0.0 allows an attacker who supplies a crafted ext4 image to drive an out-of-bounds write when the image is mounted or parsed by a victim application built on the library. Crafted superblock fields (blocks count, first_data_block, blocks_per_group) yield a group_blocks value above INT_MAX, which turns start_bit negative inside ext4_fs_mark_bitmap_end() and makes the routine write hundreds of MiB past the block-bitmap buffer, crashing the mounting process and potentially corrupting adjacent heap memory. Exploitation is local and requires passive user interaction - a victim must open the malicious image - so exposure is limited to systems that parse untrusted ext4 images with an unpatched build; no CISA KEV entry and no public exploit code were identified at time of analysis, and the priority is a moderate, defense-in-depth fix rather than an emergency.

RemediationAI

Vendor-released patch: apply the upstream fix commit 2760ed20808fd63b0fde9150157531fe8190c0b7 (https://github.com/Aladdin-R-D/lwext4/commit/2760ed20808fd63b0fde9150157531fe8190c0b7), which converts the bitmap-end parameters to uint32_t, validates bmp_blk and inode_table against the filesystem and group bounds, and rejects images where group_blocks exceeds the bitmap bit count; a tagged lwext4 release containing this change was not independently confirmed, so integrators should verify the commit is present in their vendored copy. Until a patched build is deployed, restrict the library to mounting only self-generated or otherwise trusted ext4 images and never mount attacker-supplied images in a privileged or long-lived process - performing mounts inside a sandboxed, resource-limited child process that is restarted on failure limits the blast radius to a crash instead of heap corruption in the host application, at the cost of the added isolation overhead and loss of in-process caching. Reviewing the advisory at https://www.vulncheck.com/advisories/lwext4-through-1.0.0-out-of-bounds-write-via-ext4-fs-mark-bitmap-end and the upstream issue https://github.com/gkostka/lwext4/issues/172 provides the reproduction and code-level detail needed to backport the checks if a full library upgrade is not possible.

Affected VersionsENISA

lwext4 0 ≤1.0.0

Affected Packages

euvd lwext4 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

lwext4 is a portable, dependency-free C library for reading and writing ext4 filesystems, commonly embedded in firmware, bootloaders, recovery tools and forensic/imaging utilities. The flaw is a CWE-787 out-of-bounds write that arises in ext4_fs_init_block_bitmap() (src/ext4_fs.c), which initialises the block bitmap of a block group before writing it back. The function sizes the bitmap as block_size * 8 bits and derives group_blocks from superblock fields; the value is passed, along with start_bit, as a signed int into ext4_fs_mark_bitmap_end(). When a crafted image makes group_blocks exceed INT_MAX, start_bit becomes negative, and the round-up loop condition ((start_bit + 7) & ~7UL) combined with bit-setting far past the buffer produces the out-of-bounds write. The supplied fix converts start_bit/end_bit/loop counters to uint32_t, uses a 64-bit inode_table_bcnt, rejects block-bitmap or inode-table blocks that fall outside the filesystem or outside their own group when flex_bg is disabled, and adds a hard check returning EIO when group_blocks > bmp_bits; the same commit also adds bounds checks on the directory index checksum region (cnt > limit) in src/ext4_dir_idx.c. The trigger is described in the sources as attacker-controlled superblock fields in a crafted ext4 image; the demonstrated impact in the assessment is availability (crash of the mounting application) with a low integrity effect.

Know when Lwext4 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 (VulnCheck) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
vuln.today AI 6.1 MEDIUM

Attacker needs no privileges but must deliver a crafted image a local victim mounts, so AV:L/PR:N/UI:R; impact is a crash (A:H) with limited heap-integrity effect (I:L) and no confidentiality loss.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

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

DescriptionCVE.org

lwext4 through 1.0.0 contains an out-of-bounds write vulnerability in ext4_fs_mark_bitmap_end() in src/ext4_fs.c that allows attackers to corrupt heap memory via a crafted ext4 image. Attackers can supply superblock fields yielding group_blocks above INT_MAX, making start_bit negative and writing hundreds of MiB past the bitmap buffer, crashing the mounting application.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Low
niche embedded/portable ext4 library, limited to firmware and specialized tooling
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 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· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
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.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

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