Skip to content

Commit

Permalink
fix: prevent CVE-2025-24883 in eth-node's crypto package
Browse files Browse the repository at this point in the history
iterates: #6330
  • Loading branch information
osmaczko committed Feb 6, 2025
1 parent 0526d18 commit e377d09
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eth-node/crypto/gethcrypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ func UnmarshalPubkey(pub []byte) (*ecdsa.PublicKey, error) {
if x == nil {
return nil, errInvalidPubkey
}
if !S256().IsOnCurve(x, y) {
return nil, errInvalidPubkey
}
return &ecdsa.PublicKey{Curve: S256(), X: x, Y: y}, nil
}

Expand Down

0 comments on commit e377d09

Please sign in to comment.