VYPR
Low severityNVD Advisory· Published Feb 19, 2026· Updated Apr 15, 2026

CVE-2026-26958

CVE-2026-26958

Description

filippo.io/edwards25519 is a Go library implementing the edwards25519 elliptic curve with APIs for building cryptographic primitives. In versions 1.1.0 and earlier, MultiScalarMult produces invalid results or undefined behavior if the receiver is not the identity point. If (*Point).MultiScalarMult is called on an initialized point that is not the identity point, it returns an incorrect result. If the method is called on an uninitialized point, the behavior is undefined. In particular, if the receiver is the zero value, MultiScalarMult returns an invalid point that compares Equal to every other point. Note that MultiScalarMult is a rarely used, advanced API. For example, users who depend on filippo.io/edwards25519 only through github.com/go-sql-driver/mysql are not affected. This issue has been fixed in version 1.1.1.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
filippo.io/edwards25519Go
< 1.1.11.1.1

Affected products

1

Patches

1
d1c650afb95f

extra: initialize receiver in MultiScalarMult

https://github.com/FiloSottile/edwards25519Filippo ValsordaFeb 15, 2026via ghsa
3 files changed · +34 0
  • edwards25519_test.go+3 0 modified
    @@ -18,6 +18,9 @@ var I = NewIdentityPoint()
     func checkOnCurve(t *testing.T, points ...*Point) {
     	t.Helper()
     	for i, p := range points {
    +		if p.z.Equal(new(field.Element)) == 1 {
    +			t.Errorf("point %d has Z == 0 (degenerate projective point)", i)
    +		}
     		var XX, YY, ZZ, ZZZZ field.Element
     		XX.Square(&p.x)
     		YY.Square(&p.y)
    
  • extra.go+1 0 modified
    @@ -265,6 +265,7 @@ func (v *Point) MultiScalarMult(scalars []*Scalar, points []*Point) *Point {
     	tmp1 := &projP1xP1{}
     	tmp2 := &projP2{}
     	// Lookup-and-add the appropriate multiple of each input point
    +	v.Set(NewIdentityPoint())
     	for j := range tables {
     		tables[j].SelectInto(multiple, digits[j][63])
     		tmp1.Add(v, multiple) // tmp1 = v + x_(j,63)*Q in P1xP1 coords
    
  • extra_test.go+30 0 modified
    @@ -149,6 +149,36 @@ func TestMultiScalarMultMatchesBaseMult(t *testing.T) {
     	}
     }
     
    +func TestMultiScalarMultZeroReceiver(t *testing.T) {
    +	// A zero-value (uninitialized) receiver should be handled correctly,
    +	// producing a valid point on the curve.
    +	var p Point
    +	p.MultiScalarMult([]*Scalar{dalekScalar}, []*Point{B})
    +
    +	var check Point
    +	check.ScalarBaseMult(dalekScalar)
    +
    +	checkOnCurve(t, &p, &check)
    +	if p.Equal(&check) != 1 {
    +		t.Error("MultiScalarMult with zero-value receiver did not match ScalarBaseMult")
    +	}
    +}
    +
    +func TestMultiScalarMultReceiverAliasing(t *testing.T) {
    +	// The receiver v aliasing one of the input points should produce
    +	// the correct result.
    +	p := NewGeneratorPoint()
    +	p.MultiScalarMult([]*Scalar{dalekScalar}, []*Point{p})
    +
    +	var check Point
    +	check.ScalarBaseMult(dalekScalar)
    +
    +	checkOnCurve(t, p, &check)
    +	if p.Equal(&check) != 1 {
    +		t.Error("MultiScalarMult with aliased receiver did not match ScalarBaseMult")
    +	}
    +}
    +
     func TestVarTimeMultiScalarMultMatchesBaseMult(t *testing.T) {
     	varTimeMultiScalarMultMatchesBaseMult := func(x, y, z Scalar) bool {
     		var p, q1, q2, q3, check Point
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.