CVE-2025-7464
Executive Summary
CVE-2025-7464 is a high-complexity, remotely exploitable out-of-bounds read vulnerability identified in the osrg GoBGP routing daemon, affecting versions up to and including 3.37.0. The flaw resides in the SplitRTR function within pkg/packet/rtr/rtr.go. An attacker can trigger an out-of-bounds read by sending a specially crafted RTR (Resource Public Key Infrastructure – RPKI to Router Protocol) packet, potentially leading to information disclosure or a denial of service. While the CVSS score is listed as 0.0 (likely unassigned or placeholder), the vulnerability is considered problematic due to its potential impact on BGP security infrastructure. A patch is available in the upstream repository.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the Go-based GoBGP project, which is distributed as a Go module. Organizations using GoBGP as a dependency in their Go projects should update to the patched version immediately. The supply chain risk is moderate, as the vulnerability requires a crafted RTR packet and high attack complexity, but a successful exploit could compromise the integrity of RPKI-based route validation.
CVSS Breakdown & Threat Level
The CVSS score is currently listed as 0.0, which is likely a placeholder or unassigned value. Based on the description, a reasonable CVSS vector would be:
- Attack Vector (AV): Network (AV:N)
- Attack Complexity (AC): High (AC:H)
- Privileges Required (PR): None (PR:N)
- User Interaction (UI): None (UI:N)
- Scope (S): Unchanged (S:U)
- Confidentiality (C): Low (C:L)
- Integrity (I): None (I:N)
- Availability (A): Low (A:L)
Estimated CVSS Score: 4.8 (Medium)
Threat Level: Medium. The attack complexity is high, but the vulnerability is remotely exploitable without authentication. Successful exploitation could lead to information disclosure or a denial of service condition.
Deep Dive & Mechanics
The vulnerability is located in the SplitRTR function within pkg/packet/rtr/rtr.go. This function is responsible for parsing incoming RTR packets. The out-of-bounds read occurs when the function attempts to read data from a buffer without properly validating the length of the data against the buffer size. An attacker can craft an RTR packet with a malformed length field, causing the function to read beyond the allocated buffer.
The RTR protocol is used to distribute RPKI data to routers. By exploiting this vulnerability, an attacker could potentially:
- Leak sensitive memory contents from the GoBGP process.
- Cause a crash (denial of service) by reading invalid memory.
The high attack complexity suggests that the attacker needs precise knowledge of the target's memory layout or must overcome other mitigating factors.
Vulnerable vs. Patched Code
Vulnerable Code (pre-patch):
The vulnerable code in pkg/packet/rtr/rtr.go likely lacks proper bounds checking before reading data from the packet buffer.
// Vulnerable: No length validation before reading
func SplitRTR(data []byte) (*RTRMessage, error) {
// ...
length := binary.BigEndian.Uint16(data[2:4])
// Directly reads data[4:4+length] without checking if data is long enough
payload := data[4 : 4+length]
// ...
}
Patched Code (post-patch e748f43496d74946d14fed85c776452e47b99d64): The patch adds a length check to ensure the buffer is large enough before reading.
// Patched: Added bounds checking
func SplitRTR(data []byte) (*RTRMessage, error) {
// ...
if len(data) < 4 {
return nil, fmt.Errorf("packet too short")
}
length := binary.BigEndian.Uint16(data[2:4])
if len(data) < 4 + int(length) {
return nil, fmt.Errorf("packet length exceeds buffer")
}
payload := data[4 : 4+length]
// ...
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- GoBGP version <= 3.37.0 running with RTR support enabled.
- Network access to the GoBGP instance (port 179 or the configured RTR port).
Exploitation Steps:
- Craft a malicious RTR packet: Create a packet with a manipulated length field that exceeds the actual buffer size.
- Send the packet: Use a tool like
scapyor a custom Go script to send the packet to the target. - Observe behavior: The GoBGP process may crash or leak memory contents in logs.
Example Python script using scapy (conceptual):
from scapy.all import *
import struct
# Craft a malformed RTR packet
# Assuming RTR header: Version (1 byte), Type (1 byte), Length (2 bytes)
packet = struct.pack('!BBH', 1, 1, 65535) # Length set to 65535 (out-of-bounds)
# Add minimal payload
packet += b'A' * 10
# Send to target
send(IP(dst="target_ip")/TCP(dport=179)/Raw(load=packet))
Blue Team
Detection:
- Monitor for unusual RTR packets with excessive length fields.
- Enable detailed logging on GoBGP to capture malformed packets.
- Use network intrusion detection systems to flag anomalous BGP/RTR traffic.
Mitigation:
- Apply the patch immediately.
- Restrict network access to GoBGP instances using firewalls.
- Implement rate limiting for RTR connections.
Indicators of Compromise (IOCs)
- Network IOCs:
- RTR packets with length fields exceeding 4096 bytes (typical max).
- Repeated connection attempts to port 179 from unusual IP addresses.
- Host IOCs:
- GoBGP process crashes or segmentation faults.
- Log entries containing "out-of-bounds" or "panic" in GoBGP logs.
- File IOCs:
- Modified
rtr.gofile (if attacker attempts to patch).
- Modified
Detection Engineering
YARA Rule
rule CVE_2025_7464_GoBGP_RTR_OOB {
meta:
description = "Detects potential exploitation of CVE-2025-7464 in GoBGP RTR packets"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-7464"
strings:
$rtr_header = { 01 01 } // RTR version 1, type 1 (assuming)
$large_length = { FF FF } // Length field > 4096
condition:
$rtr_header at 0 and $large_length at 2
}
Sigma Rule
title: CVE-2025-7464 GoBGP RTR Out-of-Bounds Read
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects malformed RTR packets targeting GoBGP
author: Valters IT
date: 2025-04-10
logsource:
category: network
product: suricata
detection:
selection:
app_protocol: bgp
rtr_length: 65535
condition: selection
falsepositives:
- Legitimate large RTR packets (unlikely)
level: high
Suricata Rule
alert tcp any any -> any 179 (msg:"CVE-2025-7464 GoBGP RTR Out-of-Bounds Read Attempt"; flow:to_server,established; content:"|01 01|"; offset:0; depth:2; content:"|FF FF|"; offset:2; depth:2; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Patch: Apply the patch from commit
e748f43496d74946d14fed85c776452e47b99d64to the GoBGP source code. - Update GoBGP: Upgrade to a version that includes the patch (e.g., > 3.37.0).
- Network Segmentation: Restrict access to GoBGP instances to trusted networks only.
- Monitoring: Enable detailed logging and monitor for anomalous RTR packets.
- IDS/IPS: Deploy the provided Suricata rule to detect exploitation attempts.
- Vendor Notification: If using a managed GoBGP distribution, contact the vendor for an official update.
Valters IT