CVE-2026-138151: bgpq4 before 1.17 Heap Buffer Overflow via IRRd A<len> Reply Handling
bgpq4 before 1.17 contains an integer overflow vulnerability in expander.c that allows malicious IRR servers to corrupt heap memory by sending crafted A<len> replies. Attackers controlling the IRR server or tampering with the plaintext TCP connection can announce a ULONGMAX or -1 length, wrapping the allocation to one byte and crashing bgpq4.
Affected Software
Event History
Frequently Asked Questions
Who can exploit this issue in practice?
An attacker must control the IRR server used by bgpq4 or be able to tamper with the plaintext TCP connection between bgpq4 and that server. The attacker can then send a crafted A<len> reply with a length such as ULONG_MAX or -1.
What is the likely impact of a successful exploit?
The crafted length causes an integer overflow that wraps the heap allocation to one byte, followed by heap memory corruption. The described outcome is a crash of bgpq4, resulting in denial of service.
Which versions need remediation?
bgpq4 versions before 1.17 are affected. Upgrade to version 1.17 or later.
What can be done if an upgrade cannot be applied immediately?
Use only trusted IRR servers and protect the connection to them from plaintext TCP tampering. The vulnerability depends on receiving a malicious A<len> response from the server or an on-path attacker.