CVE-2023-49292
JSON

4.9medium

Possible private key restoration in go package github.com/ecies/go

Severity
4.9medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.34% (higher than 28% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8j98-cjfr-qx3hGO-2023-2380

Description

ecies is an Elliptic Curve Integrated Encryption Scheme for secp256k1 in Golang. If funcations Encapsulate(), Decapsulate() and ECDH() could be called by an attacker, they could recover any private key that interacts with it. This vulnerability was patched in 2.0.8. Users are advised to upgrade.

Affected

Product or packageVersionsReported by
ecies go< 2.0.8, before 2.0.8CVE List, NVD
github.com/ecies/go/v2 (Go)before 2.0.8GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD4.8medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

Classification

What each source says

CVE List

ecies is an Elliptic Curve Integrated Encryption Scheme for secp256k1 in Golang. If funcations Encapsulate(), Decapsulate() and ECDH() could be called by an attacker, they could recover any private key that interacts with it. This vulnerability was patched in 2.0.8. Users are advised to upgrade.

GitHub Advisory Database
Impact

If functions Encapsulate(), Decapsulate() and ECDH() could be called by an attacker, he could recover any private key that he interacts with.

Patches

Patched in v2.0.8

Workarounds

You could manually check public key by calling IsOnCurve() function from secp256k1 libraries.

References

https://github.com/ashutosh1206/Crypton/blob/master/Diffie-Hellman-Key-Exchange/Attack-Invalid-Curve-Point/README.md

Go Vulnerability Database

An attacker may be able to recover private keys due to a bug in the ECDH function.

The library does not check whether the provided public key is on the curve, which means that an attacker can create a public key that is not on the curve and use it to recover the private key.

A workaround is to manually check that the public key is valid by calling the IsOnCurve function from the secp256k1 libraries.

NVD (es)

ecies es un esquema de cifrado integrado de curva elíptica para secp256k1 en Golang. Si un atacante pudiera llamar a las funciones Encapsulate(), Decapsulate() y ECDH(), podría recuperar cualquier clave privada que interactúe con ellas. Esta vulnerabilidad fue parcheada en 2.0.8. Se recomienda a los usuarios que actualicen.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-49292 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-8j98-cjfr-qx3h changed 2023-12-11CC-BY-4.0
Go Vulnerability DatabaseGO-2023-2380 changed 2024-05-20CC-BY-4.0
NVDCVE-2023-49292 changed 2026-06-17Public domain