CVE-2021-3114: Incorrect operations on the P-224 curve in crypto/elliptic

stdlib Updated 02 Oct 2025

Summary

17/02/2022
Yes i
Unrated
Not published

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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.14 1.14.14
    go get stdlib@v1.14.14
  • >= 1.15.0-0, < 1.15.7 1.15.7
    go 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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for stdlib.

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.14 1.14.14
    go get stdlib@v1.14.14
  • >= 1.15.0-0, < 1.15.7 1.15.7
    go 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback