CVE-2022-28327: Panic due to large inputs affecting P-256 curves in crypto/elliptic
Summary
CVE-2022-28327: Panic due to large inputs affecting P-256 curves in crypto/elliptic. Affects stdlib across 2 version ranges.
< 1.17.9
>= 1.18.0-0, < 1.18.1
Fixed in 1.17.9 or 1.18.1, depending on the release line you run. How to fix ↓
Also tracked for
- golang · Bitnami
The same CVE-2022-28327 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. The crypto/elliptic package within stdlib implements elliptic curve cryptography, including the P-256 curve. This vulnerability affects the P-256 curve operations in the crypto/elliptic package.
Vulnerability Detail
A crafted scalar input longer than 32 bytes can cause panic in the P256().ScalarMult or P256().ScalarBaseMult functions. This vulnerability can be triggered by calling the affected functions with a malicious input. It can lead to denial of service (DoS) as the panic will cause the program to terminate abruptly. It is important to note that indirect uses through crypto/ecdsa and crypto/tls are not affected. The vulnerability impacts the amd64, arm64, ppc64le, and s390x architectures.
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.17.91.17.9go get stdlib@v1.17.9 -
>= 1.18.0-0, < 1.18.11.18.1go get stdlib@v1.18.1
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. Updating the Go stdlib package to the fixed versions is the recommended solution.
Conclusion
The vulnerability in the P-256 curve operations in the crypto/elliptic package can be exploited by a crafted scalar input longer than 32 bytes, leading to a panic and denial of service. To mitigate this issue, it is crucial to update the Go stdlib package to the fixed versions. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for stdlib →
FAQ
The vulnerability can lead to denial of service (DoS) as it causes the program to panic and terminate abruptly.
The vulnerability affects the amd64, arm64, ppc64le, and s390x architectures.
No, indirect uses through crypto/ecdsa and crypto/tls are not affected by this vulnerability.
It is recommended to update the Go stdlib package to version 1.17.9 or 1.18.1, depending on the version currently in use.
No, there is no known workaround for this vulnerability. Updating the Go stdlib package to the fixed versions is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.