CVE-2022-23806: Incorrect computation for some invalid field elements in crypto/elliptic

stdlib Updated 02 Oct 2025

Summary

23/05/2022
Yes i
Unrated
Not published

CVE-2022-23806: Incorrect computation for some invalid field elements in crypto/elliptic. Affects stdlib across 2 version ranges.

< 1.16.14 >= 1.17.0-0, < 1.17.7

Fixed in 1.16.14 or 1.17.7, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-23806 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The stdlib package in the Go ecosystem provides a set of standard libraries for the Go programming language. One of the packages included is crypto/elliptic, which implements elliptic curve cryptography. This package offers functionality for working with elliptic curves, including curve parameters and point operations. However, a vulnerability has been discovered in the computation of some invalid field elements in the crypto/elliptic package.

Vulnerability Detail

The vulnerability (CVE-2022-23806) arises from the incorrect computation of certain big.Int values that are not valid field elements. These values can be negative or overflowing, causing the Curve.IsOnCurve function to incorrectly return true. This can lead to various issues, including panics or invalid curve operations. It is important to note that the Unmarshal function will never return such invalid values. The vulnerability affects versions 0 through 1.16.13 and 1.17.0-0 through 1.17.6 of the stdlib package in the Go ecosystem.

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.16.14 1.16.14
    go get stdlib@v1.16.14
  • >= 1.17.0-0, < 1.17.7 1.17.7
    go get stdlib@v1.17.7

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 specific workaround mentioned for this vulnerability.

Conclusion

In conclusion, the vulnerability (CVE-2022-23806) in the crypto/elliptic package of the stdlib package in the Go ecosystem can lead to incorrect computation and potential security issues. It is crucial to update to the fixed versions (1.16.14 or 1.17.7) to mitigate the vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for stdlib →

Share this vulnerability

FAQ

The vulnerability can lead to panics or invalid curve operations when operating on certain invalid field elements. This can potentially be exploited by attackers to cause denial of service or other security issues.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your Gopkg.lock file to the playground and it will alert you in real-time if your application is vulnerable.

There is no known exploit available for this vulnerability at the moment. However, it is still important to update to the fixed versions to prevent any potential exploitation.

This vulnerability specifically affects the stdlib package in the Go ecosystem. Other packages or ecosystems may have their own separate vulnerabilities and should be evaluated independently.

You can find more information about this vulnerability, including the technical details and affected versions, at the following URL: https://pkg.go.dev/vuln/GO-2021-0319

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.16.14 1.16.14
    go get stdlib@v1.16.14
  • >= 1.17.0-0, < 1.17.7 1.17.7
    go get stdlib@v1.17.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