A new vulnerability, CVE-2025-23018, has been found in how IPv4-in-IPv6 and IPv6-in-IPv6 tunneling works according to RFC 2473. The issue is that these tunneling mechanisms do not require any validation or verification of the packet source. This flaw enables attackers to spoof packets and route arbitrary network traffic through exposed interfaces, potentially reaching networks far beyond their intended scope.
If this sounds familiar, that’s because it is: a very similar issue was described in CVE-202-10136. This time, the exposure includes both IPv4-in-IPv6 and IPv6-in-IPv6 tunnels.
Let’s break down what this means, show a code example, and discuss how attackers might abuse the flaw.
What’s the Problem?
Tunneling lets you encapsulate one network protocol (like IPv4) inside another (like IPv6). This is handy for moving older traffic over newer networks. RFC 2473 describes _Generic Packet Tunneling_ in IPv6.
But the problem is, the specifications and typical implementations don’t require a tunnel entry point to check if the _source IP_ of a packet is legit. That means anyone who can reach the tunnel interface can send packets _as if_ they’re from anywhere, or to any address, and the system usually just forwards them right along—no questions asked.
Example: How it Works
Say you have an IPv6-in-IPv6 tunnel on a system at 2001:db8::1. An attacker can send a specially crafted packet from anywhere, and the tunnel might forward the payload _as if_ it came from some trusted source.
For researchers and sysadmins: here's a demonstration using scapy (must be run as root/admin)
from scapy.all import IPv6, send
# This represents the inner packet (the payload you want to spoof)
inner_pkt = IPv6(src="2001:db8:badcde::1", dst="2001:db8:deadbeef::1")/b"Hello world!"
# This is the outer (tunnel) packet
outer_pkt = IPv6(src="attacker:ipv6:addr::1", dst="tunnel:iface:addr::1")/inner_pkt
# Send the spoofed packet to the tunnel endpoint
send(outer_pkt)
With this, the system at tunnel:iface:addr::1 unwinds the layers and forwards the inner packet as if it came from the trusted 2001:db8:badcde::1 address. An attacker can use this to send packets into networks that only trust certain IP ranges or to bypass firewall rules.
Potential Attack Scenarios
- Spoofing Internal Addresses: Attacker can send packets pretending to be from inside your network. This could bypass access controls or trigger malicious responses.
- Network Scanning & Evasion: Use the tunnel endpoint as a launchpad to scan or attack other internal hosts, making it look like the traffic comes from a trusted internal source.
- Amplification/Reflection Attacks: Abuse other services by spoofing their IPs via your tunnel, possibly for Distributed Denial of Service (DDoS) attacks.
How to Detect and Protect
- Audit for Exposed Tunnel Interfaces: Check if your systems have IPv4-in-IPv6 or IPv6-in-IPv6 tunnels with interfaces exposed to untrusted networks.
Source IP Filter: Apply firewall rules to only accept packets from expected, trusted sources.
- Tunnel Authentication: Use tunnel protocols that require authentication, or at least source validation.
References and Further Reading
- RFC 2473: Generic Packet Tunneling in IPv6 Specification
- Mitre CVE-2025-23018 _(Placeholder until published)_
- CVE-202-10136: Tunnel Security Flaw
- Scapy Documentation – Building IPv6 Tunnels
Final Thoughts
CVE-2025-23018 shows that even fundamental internet protocols may have gaps when it comes to security. While tunnels are vital for interconnecting systems, careless configuration can open the door to dangerous spoofing, routing, and privilege escalation attacks. Always make sure you’re locking down any exposed interface, especially those bridging networks.
Timeline
Published on: 01/14/2025 20:15:32 UTC
Last modified on: 01/29/2025 18:01:47 UTC