-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): update dependency secp256k1 [security] #8162
Open
live-github-bot
wants to merge
1
commit into
develop
Choose a base branch
from
renovate/npm-secp256k1-vulnerability
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+126
−153
Conversation
This file contains 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 5 Skipped Deployments
|
live-github-bot
bot
added
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 21, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
October 21, 2024 22:15
6305d0f
to
efa0d25
Compare
live-github-bot
bot
removed
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 21, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
October 21, 2024 22:26
efa0d25
to
ddd00a1
Compare
live-github-bot
bot
added
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 21, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
October 21, 2024 22:35
ddd00a1
to
f9a2684
Compare
live-github-bot
bot
removed
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 21, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
October 21, 2024 22:44
f9a2684
to
6f2fc01
Compare
live-github-bot
bot
added
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 21, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
October 21, 2024 22:50
6f2fc01
to
dd14cd2
Compare
live-github-bot
bot
removed
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 21, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
October 21, 2024 22:57
dd14cd2
to
51c3066
Compare
live-github-bot
bot
added
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 21, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
October 21, 2024 23:03
51c3066
to
4811d61
Compare
live-github-bot
bot
removed
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 21, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
October 22, 2024 22:06
4811d61
to
d134279
Compare
live-github-bot
bot
changed the title
chore(deps): update dependency secp256k1 [security]
chore(deps): update dependency secp256k1 to v5.0.1 [security]
Oct 22, 2024
live-github-bot
bot
added
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 22, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
October 22, 2024 22:15
d134279
to
0e7e537
Compare
live-github-bot
bot
removed
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 22, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
October 22, 2024 22:27
0e7e537
to
e5a44de
Compare
live-github-bot
bot
added
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 22, 2024
live-github-bot
bot
removed
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 31, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
November 1, 2024 22:05
2c5a921
to
108120c
Compare
live-github-bot
bot
added
desktop
Has changes in LLD
ledgerjs
Has changes in the ledgerjs open source libs
labels
Nov 1, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
November 1, 2024 22:15
108120c
to
4422f91
Compare
live-github-bot
bot
removed
desktop
Has changes in LLD
ledgerjs
Has changes in the ledgerjs open source libs
labels
Nov 1, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
November 1, 2024 22:26
4422f91
to
2993668
Compare
live-github-bot
bot
added
desktop
Has changes in LLD
ledgerjs
Has changes in the ledgerjs open source libs
labels
Nov 1, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
November 1, 2024 22:35
2993668
to
6dcaf5d
Compare
live-github-bot
bot
removed
desktop
Has changes in LLD
ledgerjs
Has changes in the ledgerjs open source libs
labels
Nov 1, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
November 1, 2024 22:43
6dcaf5d
to
78558ab
Compare
live-github-bot
bot
added
desktop
Has changes in LLD
ledgerjs
Has changes in the ledgerjs open source libs
labels
Nov 1, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
November 1, 2024 22:50
78558ab
to
4b4e73b
Compare
live-github-bot
bot
removed
desktop
Has changes in LLD
ledgerjs
Has changes in the ledgerjs open source libs
labels
Nov 1, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
November 1, 2024 22:57
4b4e73b
to
74e19b6
Compare
live-github-bot
bot
added
desktop
Has changes in LLD
ledgerjs
Has changes in the ledgerjs open source libs
labels
Nov 1, 2024
live-github-bot
bot
force-pushed
the
renovate/npm-secp256k1-vulnerability
branch
from
November 1, 2024 23:02
74e19b6
to
bd360a7
Compare
live-github-bot
bot
removed
desktop
Has changes in LLD
ledgerjs
Has changes in the ledgerjs open source libs
labels
Nov 1, 2024
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.
This PR contains the following updates:
5.0.0
->5.0.1
5.0.0
->5.0.1
4.0.3
->4.0.4
GitHub Vulnerability Alerts
CVE-2024-48930
Summary
In
elliptic
-based version,loadUncompressedPublicKey
has a check that the public key is on the curve: https://github.com/cryptocoinjs/secp256k1-node/blob/6d3474b81d073cc9c8cc8cfadb580c84f8df5248/lib/elliptic.js#L37-L39loadCompressedPublicKey
is, however, missing that check: https://github.com/cryptocoinjs/secp256k1-node/blob/6d3474b81d073cc9c8cc8cfadb580c84f8df5248/lib/elliptic.js#L17-L19That allows the attacker to use public keys on low-cardinality curves to extract enough information to fully restore the private key from as little as 11 ECDH sessions, and very cheaply on compute power
Other operations on public keys are also affected, including e.g.
publicKeyVerify()
incorrectly returningtrue
on those invalid keys, and e.g.publicKeyTweakMul()
also returning predictable outcomes allowing to restore the tweakDetails
The curve equation is
Y^2 = X^3 + 7
, and it restoresY
fromX
inloadCompressedPublicKey
, usingY = sqrt(X^3 + 7)
, but when there are no validY
values satisfyingY^2 = X^3 + 7
for a givenX
, the same code calculates a solution for-Y^2 = X^3 + 7
, and that solution also satisfies some other equationY^2 = X^3 + D
, whereD
is not equal to 7 and might be on a curve with factorizable cardinality, so(X,Y)
might be a low-order point on that curve, lowering the number of possible ECDH output values to bruteforcableThose output values correspond to remainders which can be then combined with Chinese remainder theorem to restore the original value
Endomorphism-based multiplication only slightly hinders restoration and does not affect the fact that the result is low-order
10 different malicious X values could be chosen so that the overall extracted information is 238.4 bits out of 256 bit private key, and the rest is trivially bruteforcable with an additional 11th public key (which might be valid or not -- not significant)
The attacker does not need to receive the ECDH value, they only need to be able to confirm it against a list of possible candidates, e.g. check if using it to decipher block/stream cipher would work -- and that could all be done locally on the attacker side
PoC
Example public key
This key has order 39
One of the possible outcomes for it is a throw, 38 are predictable ECDH values
Keys used in full attack have higher order (starting from ~20000), so are very unlikely to cause an error
Full attack
This PoC doesn't list the exact public keys or the code for
solver.js
intentionally, but this exact code works, on arbitrary random private keys:Result:
Impact
Remote private key is extracted over 11 ECDH sessions
The attack is very low-cost, precompute took a few days on a single MacBook Air, and extraction takes ~10 minutes on the same MacBook Air
Also:
publicKeyVerify()
misreports malicious public keys as validpublicKeyTweakMul
result and other public key operationsRelease Notes
cryptocoinjs/secp256k1-node (secp256k1)
v5.0.1
Compare Source
Configuration
📅 Schedule: Branch creation - "" in timezone Europe/Paris, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Renovate Bot.