CVE-2024-24790: stdlib - Is methods not working as expected for IPv4-mapped IPv6 addresses
Summary
CVE-2024-24790: The various Is methods (IsPrivate, IsLoopback, etc) did not work as expected for IPv4-mapped IPv6 addresses, returning false for addresses which would return true in their traditional IPv4 forms. Affects golang-1.15 versions < 48103d97a84d549b44bc4764df6958f73ba5ee02. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The stdlib package is a standard library in the Go programming language. It provides a collection of packages that offer fundamental functionality for Go programs. The package in question, stdlib, version 1.18.2, includes various Is methods such as IsPrivate and IsLoopback. These methods are used to determine specific properties of IP addresses. However, in this version, these methods do not function correctly for IPv4-mapped IPv6 addresses, resulting in false results for addresses that should return true in their traditional IPv4 forms.
Vulnerability Detail
The vulnerability in stdlib version 1.18.2 affects the Is methods used to identify properties of IP addresses. Specifically, when dealing with IPv4-mapped IPv6 addresses, the methods incorrectly return false instead of true for addresses that should be recognized as private or loopback. This discrepancy can lead to incorrect handling of these addresses, potentially resulting in security vulnerabilities or operational issues.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
No specific workaround has been provided for this vulnerability.
Conclusion
In conclusion, the stdlib package version 1.18.2 has a vulnerability that affects the Is methods used for identifying properties of IP addresses. It incorrectly handles IPv4-mapped IPv6 addresses, leading to false results. To mitigate this vulnerability, it is crucial to update to the fixed versions of stdlib (1.21.11 or 1.22.4). For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for golang-1.15 →
FAQ
The impact of this vulnerability is primarily related to the incorrect identification of IPv4-mapped IPv6 addresses. It can lead to misclassification of addresses, potentially resulting in security vulnerabilities or operational issues.
No, only version 1.18.2 of stdlib is affected. The issue has been fixed in versions 1.21.11 and 1.22.4.
No specific workaround has been provided for this vulnerability. It is recommended to update to the fixed versions of stdlib.
You can find more information about this vulnerability in the National Vulnerability Database (NVD) entry: https://nvd.nist.gov/vuln/detail/cve-2024-24790
You can use Vulert, a tool that monitors and alerts for open-source vulnerabilities, to check if your application is affected. Visit Vulert Scanner and upload your manifest file (e.g., package-lock.json) to get real-time vulnerability information.
Related vulnerabilities
Recent vulnerabilities recorded for golang-1.15.