CVE-2024-24790 Overview
The various Is methods (IsPrivate, IsLoopback, etc) in Golang did not work as expected for IPv4-mapped IPv6 addresses. These methods returned false for addresses which would return true in their traditional IPv4 forms.
Critical Impact
This vulnerability could lead to all sorts of address validation issues potentially making systems open to unauthorized network access under certain conditions.
Affected Products
- golang go
- Not Available
- Not Available
Discovery Timeline
- Not Available - Vulnerability discovered by Not Available
- Not Available - Responsible disclosure to golang
- Not Available - CVE CVE-2024-24790 assigned
- Not Available - golang releases security patch
- 2024-06-05 - CVE CVE-2024-24790 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2024-24790
Vulnerability Analysis
The vulnerability lies in the improper handling and validation of IPv4-mapped IPv6 addresses by certain utility methods within the Go standard library. This oversight could allow these addresses to bypass intended restrictions, leading to potential security breaches in systems relying on these methods for IP validation.
Root Cause
The root cause is the misimplementation of check logic in methods like IsPrivate and IsLoopback, which failed to properly identify IPv4-mapped IPv6 addresses.
Attack Vector
This vulnerability can be exploited remotely over the network. Attackers may craft requests using IPv4-mapped IPv6 addresses to bypass address checks.
// Example exploitation code (sanitized)
package main
import (
"fmt"
"net"
)
func main() {
ip := net.ParseIP("::ffff:192.168.1.1")
fmt.Println("Is private:", ip.IsPrivate()) // Unexpected output
}
Detection Methods for CVE-2024-24790
Indicators of Compromise
- Unexpected outbound network connections
- Logs with IPv4-mapped IPv6 address format
- Anomalies in network access patterns
Detection Strategies
Employ network monitoring tools to detect and alert on the use of IPv4-mapped IPv6 addresses in network traffic. Configure intrusion detection systems to flag abnormal behavior associated with these address formats.
Monitoring Recommendations
Continuous logging and analysis of network traffic are crucial. Implement alerts for unusual activities involving IPv4-mapped IPv6 addresses and review access patterns regularly.
How to Mitigate CVE-2024-24790
Immediate Actions Required
- Update to the latest version of Golang
- Reinforce network defenses against IP spoofing
- Review and update address validation logic in your applications
Patch Information
The Golang team has provided a patch which can be accessed at Golang Patch.
Workarounds
Modify application code to explicitly check for IPv4-mapped IPv6 addresses using custom validation logic until patches are applied.
# Configuration example
iptables -A INPUT -m addrtype --src-type IPV6 -j DROP
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

