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.
| Package | Affected versions | Patched versions |
|---|---|---|
filippo.io/edwards25519Go | < 1.1.1 | 1.1.1 |
Affected products
1Patches
1d1c650afb95fextra: initialize receiver in MultiScalarMult
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- github.com/advisories/GHSA-fw7p-63qq-7hprghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-26958ghsaADVISORY
- github.com/FiloSottile/edwards25519/commit/d1c650afb95fad0742b98d95f2eb2cf031393abbnvdWEB
- github.com/FiloSottile/edwards25519/releases/tag/v1.1.1nvdWEB
- github.com/FiloSottile/edwards25519/security/advisories/GHSA-fw7p-63qq-7hprnvdWEB
News mentions
0No linked articles in our index yet.