
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-31666 is a logic error vulnerability in the Linux kernel's btrfs filesystem subsystem, specifically in the lookup_extent_data_ref() function, that can cause incorrect return values leading to extent tree corruption. The flaw was introduced by commit 1618aa3c2e01 ("btrfs: simplify return variables in lookup_extent_data_ref()"), which merged the err and ret variables into a single ret variable. Affected Linux kernel versions include 6.10.1 through 6.12.81, 6.13 through 6.18.22, 6.19 through 6.19.12, and 7.0-rc1 through 7.0-rc7. It was published on April 24, 2026, with a CVSS v3.1 base score of 7.8 (High) (Github Advisory, Feedly).
The root cause is classified as CWE-393 (Return of Wrong Status Code). After the variable refactoring, when btrfs_next_leaf() returns 0 (success), the ret variable is overwritten from -ENOENT to 0. If the first key in the next leaf does not match the expected objectid or type, the function incorrectly returns 0 (success) instead of -ENOENT (not found), misleading callers into believing the lookup succeeded. This is a local vulnerability requiring low privileges and no user interaction, exploitable by any local user with access to a btrfs-mounted filesystem (Github Advisory, Feedly). The fix involves returning -ENOENT directly when the key does not match, rather than relying on the ret variable (git.kernel.org patch 1).
Successful exploitation can cause operations to be performed on the wrong extent tree item, potentially resulting in btrfs extent tree corruption and broader filesystem inconsistencies. The CVSS scoring reflects high impacts to confidentiality, integrity, and availability — a corrupted extent tree can lead to data loss, unauthorized data access, or filesystem unavailability. Systems using btrfs as their primary filesystem are at greatest risk, as corruption could render the filesystem unmountable or cause silent data integrity issues (Github Advisory, Feedly).
No public proof-of-concept exploit code is known to exist, and there is no evidence of active in-the-wild exploitation as of the time of publication (Feedly). The EPSS score is approximately 0.018% (3rd percentile), indicating a very low probability of exploitation in the near term (Github Advisory). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires local access with low privileges on a system using a vulnerable btrfs kernel version.
Patches are available in the upstream Linux kernel. Affected systems should be updated to the following fixed versions: Linux kernel 6.12.82 or later, 6.18.23 or later, 6.19.13 or later, or the mainline 7.0 release. Patch commits are available at git.kernel.org: 316fb1b3169efb081d2db910cbbfef445afa03b9, 4125a194db4a6cf91f619f38788272651cb97dce, 450e6a685d0cad95b15f8af152057bd0bf79f50b, and ab1e022379c3c811aa72da8eb0c7507859a1d0f5 (Feedly). A SUSE security update (SUSE-SU-202621834-1) has also been released for affected SUSE Linux Enterprise systems (SUSE Advisory). As a precautionary measure, administrators should run btrfs check on affected systems after patching to verify filesystem integrity.
The vulnerability was announced via the Linux kernel CVE announcement mailing list and tracked by major vulnerability databases including NVD, GitHub Advisory Database, and Red Hat Bugzilla shortly after disclosure (Github Advisory, Red Hat Bugzilla). Tenable released Nessus detection plugins (IDs 310484, 318240, 319659) for the vulnerability, and SUSE issued a security update advisory. No notable independent researcher commentary or significant social media discussion has been observed beyond standard vulnerability tracking.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."