GO-2023-2380

Source
https://pkg.go.dev/vuln/GO-2023-2380
Import Source
https://vuln.go.dev/ID/GO-2023-2380.json
JSON Data
https://api.test.osv.dev/v1/vulns/GO-2023-2380
Aliases
Published
2023-12-11T15:30:30Z
Modified
2024-05-20T16:03:47Z
Summary
Private key recovery via invalid curve point in github.com/ecies/go/v2
Details

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.

Database specific
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2023-2380"
}
References

Affected packages

Go / github.com/ecies/go/v2

Package

Name
github.com/ecies/go/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/ecies/go/v2

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.0.8

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/ecies/go/v2",
            "symbols": [
                "Decrypt",
                "Encrypt",
                "PrivateKey.ECDH",
                "PrivateKey.Encapsulate",
                "PublicKey.Decapsulate"
            ]
        }
    ]
}