GHSA-2fjw-whxm-9v4q — libnftnl has Heap-based Buffer Overflow in nftnl
libnftnl has Heap-based Buffer Overflow in nftnl::Batch::with_page_size (nftnl-rs)
Does your project use an affected nftnl version?
Paste your Cargo.lock to check it for GHSA-2fjw-whxm-9v4q and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
A heap-buffer-overflow vulnerability exists in the Rust wrapper for libnftnl, triggered via the nftnl::Batch::with_page_size constructor. When a small or malformed page size is provided, the underlying C code allocates an insufficient buffer, leading to out-of-bounds writes during batch initialization.
The flaw was fixed in commit 94a286f by adding an overflow check:
batch_page_size
.checked_add(crate::nft_nlmsg_maxsize())
.expect("batch_page_size is too large and would overflow");
Advisory Timeline
- First published November 25, 2025 (366 days ago).
- Last revised December 1, 2025 — 6 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
cargo update -p nftnl --precise 0.9.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: crates.io (1).
| Package | Fixed In |
|---|---|
| nftnl crates.io · Affected: All versions | 0.9.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-122
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:L/SA:N
References
Frequently Asked Questions
- What is GHSA-2fjw-whxm-9v4q?
- libnftnl has Heap-based Buffer Overflow in nftnl::Batch::with_page_size (nftnl-rs). This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
- How do I check if my project is affected by GHSA-2fjw-whxm-9v4q?
- GHSA-2fjw-whxm-9v4q affects nftnl. Use GeekWala's free vulnerability scanner to check your dependencies against GHSA-2fjw-whxm-9v4q and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
Also Known As
Related CVEs
- RUSTSEC-2026-0501CRITICAL
Shamir backup recovery accepts a share at x = 0, so a supplied share can substitute the recovered private key
- CVE-2026-69157CRITICAL
Atomic Server: Unauthenticated `/setup` invite grants write access to the entire Drive