CVE-2022-28327: Panic due to large inputs affecting P-256 curves in crypto/elliptic

stdlib Updated 02 Oct 2025

Summary

20/05/2022
Yes i
Unrated
Not published

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

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.

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

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 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.9 1.17.9
    go get stdlib@v1.17.9
  • >= 1.18.0-0, < 1.18.1 1.18.1
    go 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 →

Share this vulnerability

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.

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.17.9 1.17.9
    go get stdlib@v1.17.9
  • >= 1.18.0-0, < 1.18.1 1.18.1
    go 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 →

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