CVE-2026-48686

Published May 26, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
FastNetMon Community Edition through 1.2.9 contains a stack-based buffer overflow in the BGP NLRI (Network Layer Reachability Information) decoder. The function decode_bgp_subnet_encoding_ipv4_raw() in src/bgp_protocol.cpp reads prefix_bit_length directly from the BGP packet (line 99) without validating it is <= 32 for IPv4 prefixes. This value is passed to how_much_bytes_we_need_for_storing_certain_subnet_mask() which computes ceil(prefix_bit_length / 8), returning up to 32 bytes for a prefix_bit_length of 255. The result is used as the length argument to memcpy() (line 106), which copies into a 4-byte uint32_t stack variable (prefix_ipv4). This causes a stack buffer overflow of up to 28 bytes, which can be exploited for arbitrary code execution. Additionally, the unvalidated prefix_bit_length is passed to convert_cidr_to_binary_netmask_local_function_copy() (line 111), where a shift of (32 - cidr) with cidr > 32 causes undefined behavior.

Analysis

AI-generated

Technical impact

FastNetMon Community Edition through release 1.2.9 decodes BGP NLRI messages without validating the prefix bit length. The vulnerable function reads a value directly from the network and uses it to determine the number of bytes for an IPv4 mask, leading to a stack‑based buffer overflow when the value exceeds 32. An attacker can craft a BGP UPDATE with an oversized prefix length, overwrite the stack, and achieve arbitrary code execution on the host running FastNetMon. This unchecked bit length also results in an out‑of‑bounds write due to the shift operation on values greater than 32.

Affected Systems

FastNetMon Community Edition up to and including version 1.2.9. The issue is present in the source file bgp_protocol.cpp where the prefix_bit_length field from BGP packets is unchecked. No other products are affected.

Risk and Exploitability

The absence of input validation allows a stack corruption that can be leveraged to achieve remote code execution, so the overall risk is high. The CVSS score of 9.8 underscores the critical severity of this flaw. The EPSS score is not available, and the vulnerability is not listed in CISA’s KEV catalog. Attackers would need to send a malicious BGP UPDATE packet to the FastNetMon instance, which is typically reachable from other routers or the public internet. Once the packet is processed, the overflow can be triggered without additional authentication, making exploitation straightforward for attackers who can reach the BGP session.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Check the FastNetMon official repository or vendor channels for a patched release that addresses the stack overflow in the BGP decoder.
  • Until a patch is available, configure firewall or ACL rules to reject BGP UPDATE messages containing prefixes with a length greater than 32 before they reach the FastNetMon process.
  • Restrict BGP neighbor sessions to trusted routers and apply strict prefix filtering or RPKI validation to prevent malformed prefixes from being injected into the measurement system.

Generated by OpenCVE AI on May 26, 2026 at 23:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6375-1 fastnetmon security update
History
Type Values Removed Values Added
CPEs cpe:2.3:a:pavel-odintsov:fastnetmon:*:*:*:*:community:*:*:*
Type Values Removed Values Added
Title Stack Corruption in FastNetMon BGP NLRI Decoder Leading to Arbitrary Code Execution
Type Values Removed Values Added
Weaknesses CWE-787
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Stack Corruption in FastNetMon BGP NLRI Decoder Leading to Arbitrary Code Execution
First Time appeared Pavel-odintsov
Pavel-odintsov fastnetmon
Weaknesses CWE-120
Vendors & Products Pavel-odintsov
Pavel-odintsov fastnetmon
Type Values Removed Values Added
Description FastNetMon Community Edition through 1.2.9 contains a stack-based buffer overflow in the BGP NLRI (Network Layer Reachability Information) decoder. The function decode_bgp_subnet_encoding_ipv4_raw() in src/bgp_protocol.cpp reads prefix_bit_length directly from the BGP packet (line 99) without validating it is <= 32 for IPv4 prefixes. This value is passed to how_much_bytes_we_need_for_storing_certain_subnet_mask() which computes ceil(prefix_bit_length / 8), returning up to 32 bytes for a prefix_bit_length of 255. The result is used as the length argument to memcpy() (line 106), which copies into a 4-byte uint32_t stack variable (prefix_ipv4). This causes a stack buffer overflow of up to 28 bytes, which can be exploited for arbitrary code execution. Additionally, the unvalidated prefix_bit_length is passed to convert_cidr_to_binary_netmask_local_function_copy() (line 111), where a shift of (32 - cidr) with cidr > 32 causes undefined behavior.
References
Weaknesses
  • CWE-120

    Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

  • CWE-787

    Out-of-bounds Write

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
May 26, 2026, 8:59 PM
Reserved
May 22, 2026, 12:00 AM
Status
Analyzed
Published
May 26, 2026, 4:16 PM
Modified
Jul 24, 2026, 11:10 AM