{"id":"GHSA-2fjw-whxm-9v4q","summary":"libnftnl has Heap-based Buffer Overflow in nftnl::Batch::with_page_size (nftnl-rs)","details":"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.\n\nThe flaw was fixed in commit 94a286f by adding an overflow check:\n```Rust\nbatch_page_size\n    .checked_add(crate::nft_nlmsg_maxsize())\n    .expect(\"batch_page_size is too large and would overflow\");\n```","aliases":["RUSTSEC-2025-0126"],"modified":"2025-12-01T16:20:48.216069Z","published":"2025-11-25T23:18:37Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2025-11-25T23:18:37Z","nvd_published_at":null,"cwe_ids":["CWE-122"],"severity":"CRITICAL"},"references":[{"type":"WEB","url":"https://github.com/mullvad/nftnl-rs/issues/76#issue-3528876468"},{"type":"WEB","url":"https://github.com/mullvad/nftnl-rs/commit/94a286f87e88f431913d19668246de9006790125"},{"type":"PACKAGE","url":"https://github.com/mullvad/nftnl-rs"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2025-0126.html"}],"affected":[{"package":{"name":"nftnl","ecosystem":"crates.io","purl":"pkg:cargo/nftnl"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.9.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 0.8.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/11/GHSA-2fjw-whxm-9v4q/GHSA-2fjw-whxm-9v4q.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}