CVE-2023-24532: stdlib - golang: crypto/internal/nistec: specific unreduced P-256 scalars produce incorrect results
Summary
CVE-2023-24532: The ScalarMult and ScalarBaseMult methods of the P256 Curve may return an incorrect result if called with some specific unreduced scalars (a scalar larger than the order of the curve). Affects golang-1.15 versions < 7bd22aafe41be40e2174335a3dc55431ca9548ec. 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 part of the Go programming language standard library. It provides a collection of modules and functions that are commonly used in Go programs. The crypto/internal/nistec module within the stdlib package implements cryptographic operations related to the NIST elliptic curves, including the P-256 curve. This vulnerability specifically affects the ScalarMult and ScalarBaseMult methods of the P256 Curve.
Vulnerability Detail
The ScalarMult and ScalarBaseMult methods of the P256 Curve in the crypto/internal/nistec module may return incorrect results when called with specific unreduced scalars. This issue arises when a scalar larger than the order of the curve is used. It is important to note that this vulnerability does not impact usages of crypto/ecdsa or crypto/ecdh. The incorrect results produced by these methods can lead to cryptographic weaknesses and potential security breaches.
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
There is no known workaround for this vulnerability. It is essential to update the stdlib package to the fixed versions mentioned above.
Conclusion
In conclusion, the stdlib package in Go programming language versions 1.18.2 and below is vulnerable to a specific issue in the crypto/internal/nistec module. This vulnerability can lead to incorrect cryptographic results and potential security breaches. To mitigate this risk, it is crucial to update the stdlib package to versions 1.19.7 or 1.20.2. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for golang-1.15 →
FAQ
This vulnerability can lead to incorrect cryptographic results when using the ScalarMult and ScalarBaseMult methods of the P256 Curve. It may introduce cryptographic weaknesses and potentially compromise the security of affected applications.
No, only versions 1.18.2 and below are affected. Versions 1.19.7 and 1.20.2 have been fixed and address this vulnerability.
No, this vulnerability specifically impacts the ScalarMult and ScalarBaseMult methods of the P256 Curve in the crypto/internal/nistec module. Usages of crypto/ecdsa or crypto/ecdh are not affected.
There is no known exploit for this vulnerability at the moment. However, it is crucial to update the stdlib package to the fixed versions to prevent any potential security breaches.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your manifest file (e.g., package-lock.json) to the playground, and it will provide real-time monitoring and alerts for open-source vulnerabilities, including this one.
Related vulnerabilities
Recent vulnerabilities recorded for golang-1.15.