Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl queried IRR server or MITM plaintext TCP
-
ExploitSend crafted A<len> reply announcing ULONG_MAX or -1
-
ExecutionInteger overflow wraps malloc(togot+2) to one byte
-
ImpactHeap buffer overflow crashes bgpq4
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to control the IRR/IRRd server that bgpq4 queries, or to be able to tamper with the plaintext (unencrypted whois/IRRd) TCP connection to a legitimate mirror, and to return a crafted 'A<len>' reply announcing a length of ULONG_MAX or -1 so that malloc(togot + 2) wraps to a one-byte allocation. Limiting factors: the attacker needs either server control or an in-path MITM position, reflected in AC:H and AT:P, which makes opportunistic exploitation hard; no authentication is required against bgpq4 itself (PR:N) and no user interaction is needed (UI:N). Impact is bounded to a denial of service / crash of the bgpq4 client per the CVSS vector (VA:H only); affected versions are bgpq4 before 1.17, fixed in 1.17. |
| Impact | The signals are internally consistent and point to a real but position-gated availability issue rather than a broadly wormable one. The CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) describes a network-reachable flaw that nonetheless carries both high attack complexity and a specific Attack Requirement (AT:P): the attacker must either operate the IRR/IRRd server bgpq4 queries or tamper with the plaintext TCP connection to it, which demands a privileged network position (MITM) or control of a queried mirror. Impact is confined to availability (VA:H; VC:N/VI:N), so despite the 'heap memory corruption' wording in the description, every scored metric and the 'Denial Of Service' tag treat the outcome as a crash, not code execution - the description implies potential memory corruption but CVSS maps only to DoS; this tension should be verified against the VulnCheck advisory before assuming exploitability beyond a crash. No EPSS score, no CISA KEV listing, and no public exploit were supplied, so there is no evidence of active or at-scale exploitation; the vuln.today Decision label is 'this_week', i.e. a prompt-but-not-emergency priority. Net: a legitimately high CVSS (8.2) driven by network reach and full availability loss, but the AC:H/AT:P gating and DoS-only impact place it below drop-everything urgency for most operators. |
| Exploit ScenarioDerived | An attacker who runs a malicious IRR server, or who can intercept the unencrypted TCP connection between bgpq4 and a legitimate IRR mirror, returns a crafted 'A<len>' reply announcing a length of ULONG_MAX or -1. bgpq4 computes malloc(togot + 2), which integer-overflows and wraps to a one-byte allocation, producing heap corruption and crashing the process. Given AC:H and AT:P, this requires the attacker to already control the response path; no public exploit identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 28, 2026
Integer overflow in bgpq4 before 1.17 lets an attacker who controls the IRR/IRRd server being queried - or who can tamper with the plaintext whois/IRRd TCP connection to a legitimate mirror - crash the client. A crafted 'A<len>' reply announcing ULONG_MAX or -1 makes malloc(togot + 2) wrap to a one-byte allocation, so the subsequent read corrupts heap memory and terminates bgpq4. No public exploit code was identified at time of analysis, but exploitation is unauthenticated (PR:N, UI:N) and is gated by the attacker's position (AC:H, AT:P); impact is availability only (VA:H), and a vendor fix exists in 1.17.
RemediationAI
Vendor-released patch: upgrade bgpq4 to version 1.17, which caps IRRd A-code reply lengths at BGPQ_MAX_REPLY_LEN (256 MB), adds errno checking around strtoul, and exits on invalid or oversized lengths in both the bgpq_read and bgpq_expand_irrd handlers. The fix is carried in https://github.com/bgp/bgpq4/pull/141 and commits https://github.com/bgp/bgpq4/commit/a232916868d1422edfc7fd5e0a00edd02c80c79a and https://github.com/bgp/bgpq4/commit/37a3adb76f18a800efa6bb02848fbfd6458512e5, with the release at https://github.com/bgp/bgpq4/releases/tag/1.17 and change notes at https://github.com/bgp/bgpq4/blob/1.17/CHANGES; the upstream advisory is https://www.vulncheck.com/advisories/bgpq4-before-1.17-heap-buffer-overflow-via-irrd-a-len-reply-handling. Where upgrading cannot be done immediately, reduce exposure by pointing bgpq4 only at IRR mirrors and network paths you control or trust, since the flaw requires operating the queried server or tampering with the plaintext connection in transit - note this narrows the attack surface but does not remove the underlying unchecked allocation, so it is not a complete substitute for the 1.17 upgrade.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
bgpq4 is a C utility that expands BGP AS-SET, prefix-list and route-set objects by speaking the IRRd/whois protocol, which runs over plaintext TCP. In expander.c, the A-code reply handler parses the announced length from the response with strtoul(response + 1, &eon, 10) and passes it directly to malloc(togot + 2); both that computation and the int offset used while reading the reply can overflow. This is CWE-190: the length is attacker-controlled and unbounded, so a value of ULONG_MAX or -1 causes the size arithmetic to wrap to a one-byte buffer, and the following read of the announced payload corrupts the heap and crashes the process. The upstream fix to 1.17 (PR #141, commits a232916868d1422edfc7fd5e0a00edd02c80c79a and 37a3adb76f18a800efa6bb02848fbfd6458512e5) checks errno, caps lengths at BGPQ_MAX_REPLY_LEN (256 MB) in both the bgpq_read and bgpq_expand_irrd code paths, and rejects anything larger with an error and exit. The affected code regions are visible in the 1.16 source at expander.c#L722-L771 and #L918-L958. The vulnerability requires the attacker to influence the server side of the query - either by operating the IRR server or by sitting in-path on the unencrypted connection - which is why the assessed vector reflects AC:H and AT:P despite the PR:N, UI:N availability impact.
Know when Bgpq4 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Attacker must control or MITM the IRR server reply (AC:H, no auth on bgpq4 so PR:N); impact is a client crash only, so C:N/I:N and A:H.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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 ULONG_MAX or -1 length, wrapping the allocation to one byte and crashing bgpq4.
Executive ViewAI
CVE-2026-138151 is a high-severity integer overflow in bgpq4 (versions before 1.17) that can crash the tool when it queries a malicious or tampered IRR server. This affects network operations teams who rely on bgpq4 for route filtering; a crash could disrupt BGP prefix-list generation and potentially impact network stability. Leadership should prioritize patching because the vulnerability is remotely exploitable without authentication, though it requires network position and currently has no known public exploit.
Apply vendor patch (upgrade to bgpq4 1.17). Until patched, restrict bgpq4 to query only trusted IRR servers over secured channels (TLS/IPsec) and monitor for crashes.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Same weakness CWE-190 – Integer Overflow or Wraparound
View allSame technique Denial Of Service
View allVendor StatusVendor
Debian
| Release | Status | Fixed Version | Urgency |
|---|---|---|---|
| bookworm | vulnerable | 1.9-1 | - |
| trixie | vulnerable | 1.12-1 | - |
| forky, sid | vulnerable | 1.16-1 | - |
| (unstable) | fixed | (unfixed) | - |
EUVD-2026-137525
GHSA-c68x-j5fv-6w36
NVD
CVE.org
EPSS
Exploit-DB