CVE-2023-24532: Incorrect calculation on P256 curves in crypto/internal/nistec
Summary
CVE-2023-24532: Incorrect calculation on P256 curves in crypto/internal/nistec. Affects stdlib across 2 version ranges.
< 1.19.7
>= 1.20.0-0, < 1.20.2
Fixed in 1.19.7 or 1.20.2, depending on the release line you run. How to fix ↓
Also tracked for
- golang · Bitnami
- golang-1.15 · Debian:11
The same CVE-2023-24532 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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 in Go is a collection of standard libraries that provide fundamental functionality for Go programs. One of the packages in stdlib is crypto/internal/nistec, which implements cryptographic operations on elliptic curves. The P256 Curve is a specific elliptic curve used for cryptographic operations such as ScalarMult and ScalarBaseMult. These operations are used in various cryptographic protocols, including ECDSA and ECDH.
Vulnerability Detail
The ScalarMult and ScalarBaseMult methods of the P256 Curve in crypto/internal/nistec may return an incorrect result when called with specific unreduced scalars, which are scalars larger than the order of the curve. This vulnerability can lead to incorrect cryptographic calculations and potentially compromise the security of systems using these operations. However, it's important to note that this vulnerability does not impact usages of crypto/ecdsa or crypto/ecdh.
How To Fix
Latest published version: go1.25.5 as of 22 Oct 2026
go get stdlib@vgo1.25.5
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 1.19.71.19.7go get stdlib@v1.19.7 -
>= 1.20.0-0, < 1.20.21.20.2go get stdlib@v1.20.2
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update the affected package to the fixed versions mentioned above.
Conclusion
In conclusion, the stdlib package in Go, specifically the crypto/internal/nistec package, is vulnerable to incorrect calculations on P256 curves. This can lead to incorrect cryptographic operations and potential security compromises. To mitigate this vulnerability, it is crucial to update the affected package to the fixed versions mentioned above. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for stdlib →
FAQ
This vulnerability can lead to incorrect cryptographic calculations on P256 curves, potentially compromising the security of systems using these operations.
The vulnerability affects the stdlib package in Go, specifically the crypto/internal/nistec package.
No, this vulnerability does not impact usages of crypto/ecdsa or crypto/ecdh.
To fix this vulnerability, update the Go stdlib package to version 1.19.7 or later, or version 1.20.2 or later.
No, there is no known workaround. Updating the affected package is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.