npm
CVE-2026-125335
Forge: Ed25519 signature verification accepts small-order public keys
- Severity
- Low 3.7
- Published
- 10 Nov 2026
- Last changed
- 10 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.4.3
- Exploit chance
- 0.2% in the next 30 daysHigher than 13% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N- Also known as
- GHSA-6889-vf6x-f3g5
- Sources
- OSV.dev and GitHub
Description
ed25519.verify() does not reject public keys of small order, such as the identity point. Under such a key, a signature with S = 0 and a small-order R verifies for many messages, or for every message with the identity key, without any private key. Fixed in node-forge 1.4.3.
crypto_sign_open() in lib/ed25519.js decodes the public key A with unpackneg(), which only checks that the point is on the curve, and then checks R == [S]B - [k]A with k = SHA-512(R || A || M). Nothing rejects public keys of small order: the identity point, the other 7 points of order 2, 4 or 8, and their non-canonical encodings with y >= p.
With S = 0, the check becomes R == k. For a small-order A, k is one of at most 8 small-order points, so an attacker can make a valid signature by trying the small-order values of R. For the identity key (01 00 … 00), R = identity and S = 0 verifies for every message. For the other small-order keys, a given message can be forged with high probability.
Workarounds
Before calling ed25519.verify() with a public key from untrusted input, reject keys whose 32-byte encoding is one of the small-order points (the identity 01 00 … 00 and the other encodings that libsodium blocks), or only verify against keys you generated or have otherwise validated.
Affected software
| Software | Affected versions |
|---|---|
node-forgenpm · osv:npm:node-forge |
|
About node-forge
- Weekly downloads (npm)
- 55,543,907npm, 23 Nov 2026
Vulnerabilities in node-forge
- In our list
- 20
- Published in the last 12 months
- 20
- Critical, last 12 months
- 0
- High, last 12 months
- 7
- Known exploited
- 0
- CVE-2026-125332Forge: TLS client crash on an unsupported ServerHello compression methodMedium 5.9 10 Nov 2026
- CVE-2026-125333Forge: ReDoS in forge.http response header and cookie trimmingMedium 5.9 10 Nov 2026
- CVE-2026-125334Forge: TLS client crash on a handshake record received without a sessionMedium 5.9 10 Nov 2026
- CVE-2026-118774Forge: Certificate signature verified with the issuer's RSA signature schemeLow 3.7 10 Nov 2026
- CVE-2026-118776Forge: Incomplete PKCS#7 padding validation in AES/DES CBC and ECB decryptionLow 3.7 10 Nov 2026
- CVE-2026-119189Forge: X.509 pathLenConstraint not enforced by verifyCertificateChain() for CA certificates without keyUsageMedium 5.9 10 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-125335
- GitHub Advisory Database https://github.com/advisories/GHSA-6889-vf6x-f3g5