[GHSA-9wx7-jrvc-28mm] Signature verification vulnerability in Stark Bank ecdsa libraries#8021
Open
RainSignal wants to merge 1 commit into
Open
Conversation
Copilot stopped work on behalf of
RainSignal due to an error
June 12, 2026 10:37
|
Hi @RainSignal The advisory already has all four listed. Could you clarify what you are asking us to change? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
Comments
The advisory only lists ecdsa-java as an affected package, but the
vulnerability affects all four Stark Bank ECDSA implementations. We
verified each implementation by reviewing the source code:
Python (starkbank-ecdsa on pip)
Fixed in v2.0.1. Verified via diff:
starkbank/ecdsa-python@v2.0.0...v2.0.1
The fix adds range checks for r and s in ellipticcurve/ecdsa.py:
if not 1 <= r <= curve.N - 1: return False
if not 1 <= s <= curve.N - 1: return False
Java (com.starkbank:ecdsa-java on Maven)
Fixed in v1.0.1. Verified by reviewing:
https://github.com/starkbank/ecdsa-java/blob/v1.0.1/src/main/java/com/starkbank/ellipticcurve/Ecdsa.java
The fix adds equivalent range checks in Ecdsa.verify().
.NET (starkbank-ecdsa on NuGet)
Fixed in v1.3.2. Verified by comparing:
https://github.com/starkbank/ecdsa-dotnet/blob/v1.3.1/EcdsaDotNet/EcdsaDotNet/ecdsa.cs (vulnerable)
https://github.com/starkbank/ecdsa-dotnet/blob/v1.3.2/EcdsaDotNet/EcdsaDotNet/ecdsa.cs (fixed)
v1.3.1 has no range checks; v1.3.2 adds:
if (sigR < 1 || sigR >= curve.N) return false;
if (sigS < 1 || sigS >= curve.N) return false;
Earliest affected version confirmed as v1.0.0.
Node.js (starkbank-ecdsa on npm)
Fixed in v1.1.3. Verified by comparing:
https://github.com/starkbank/ecdsa-node/blob/v1.1.2/ellipticcurve/ecdsa.js (vulnerable)
https://github.com/starkbank/ecdsa-node/blob/v1.1.3/ellipticcurve/ecdsa.js (fixed)
v1.1.2 has no range checks; v1.1.3 adds equivalent checks.
The ecdsa.js component did not exist in v0.0.3, so the earliest
affected version is v1.0.0.
All four implementations share the same root cause: the verify()
function does not validate that signature parameters r and s are
within the valid range [1, N-1], allowing an attacker to forge
signatures that pass verification for any public key.