Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. nftnl
  4. ›
  5. GHSA-2fjw-whxm-9v4q

GHSA-2fjw-whxm-9v4q: libnftnl has Heap-based Buffer Overflow in nftnl::Batch::with_page_size (nftnl-rs)

November 25, 2025 (updated December 1, 2025)

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");

References

  • github.com/advisories/GHSA-2fjw-whxm-9v4q
  • github.com/mullvad/nftnl-rs
  • github.com/mullvad/nftnl-rs/commit/94a286f87e88f431913d19668246de9006790125
  • github.com/mullvad/nftnl-rs/issues/76
  • rustsec.org/advisories/RUSTSEC-2025-0126.html

Code Behaviors & Features

Detect and mitigate GHSA-2fjw-whxm-9v4q with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.9.0

Fixed versions

  • 0.9.0

Solution

Upgrade to version 0.9.0 or above.

Impact 10 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-122: Heap-based Buffer Overflow

Source file

cargo/nftnl/GHSA-2fjw-whxm-9v4q.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:45 +0000.