CVE-2021-3114: Incorrect operations on the P-224 curve in crypto/elliptic
Summary
CVE-2021-3114: Incorrect operations on the P-224 curve in crypto/elliptic. Affects stdlib across 2 version ranges.
< 1.14.14
>= 1.15.0-0, < 1.15.7
Fixed in 1.14.14 or 1.15.7, depending on the release line you run. How to fix ↓
Also tracked for
- golang · Bitnami
- golang-1.15 · Debian:11
The same CVE-2021-3114 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 provides a set of standard libraries for the Go programming language. One of the packages included is crypto/elliptic, which implements elliptic curve cryptography. The P224() Curve implementation in crypto/elliptic is vulnerable to a rare circumstance where it can generate incorrect outputs, including returning invalid points from ScalarMult.
Vulnerability Detail
The vulnerability identified as CVE-2021-3114 originates from incorrect operations on the P-224 curve in the crypto/elliptic package. In specific scenarios, the P224() Curve implementation can produce incorrect outputs, potentially leading to the generation of invalid points from ScalarMult. This vulnerability can have severe consequences, including the compromise of cryptographic operations relying on the P-224 curve.
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.14.141.14.14go get stdlib@v1.14.14 -
>= 1.15.0-0, < 1.15.71.15.7go get stdlib@v1.15.7
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a workaround, developers can avoid using the P-224 curve in their cryptographic operations until the package is updated. This can be achieved by utilizing alternative curves supported by the crypto/elliptic package.
Conclusion
In conclusion, the vulnerability CVE-2021-3114 in the Go stdlib package's crypto/elliptic implementation poses a risk due to incorrect operations on the P-224 curve. It is crucial to update the package to versions 1.14.14 or 1.15.7 to fix the vulnerability and ensure the correct generation of points. If you need further assistance or support in addressing this vulnerability, please contact DevNack.com.
See every vulnerability recorded for stdlib →
FAQ
This vulnerability can lead to the generation of invalid points from ScalarMult, potentially compromising cryptographic operations relying on the P-224 curve.
Versions 0, 1.15.0-0, and any versions prior to 1.14.14 and 1.15.7 are affected by this vulnerability.
At the time of this report, there are no known exploits for this vulnerability. However, it is crucial to update the package to prevent any potential exploitation.
Yes, developers can mitigate this vulnerability by avoiding the use of the P-224 curve in their cryptographic operations until the package is updated.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using only the Gopkg.lock file without requiring access to the code or installation.
References
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.