-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update dependency elliptic to v6.6.1 [SECURITY] #153
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/npm-elliptic-vulnerability
base: master
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.
+9
−4
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
80dc0c3
to
ce784aa
Compare
New and updated dependencies detected. Learn more about Socket for GitHub ↗︎
Have feedback? Participate in our User Experience Survey 📊 |
ce784aa
to
d8e526b
Compare
0f34bd5
to
0d3cf25
Compare
de4e15d
to
541f487
Compare
541f487
to
b2b9108
Compare
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
b2b9108
to
aa70941
Compare
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:
6.5.5
->6.6.1
GitHub Vulnerability Alerts
CVE-2024-42459
In the Elliptic package 6.5.6 for Node.js, EDDSA signature malleability occurs because there is a missing signature length check, and thus zero-valued bytes can be removed or appended.
CVE-2024-42461
In the Elliptic package 6.5.6 for Node.js, ECDSA signature malleability occurs because BER-encoded signatures are allowed.
CVE-2024-42460
In the Elliptic package 6.5.6 for Node.js, ECDSA signature malleability occurs because there is a missing check for whether the leading bit of r and s is zero.
CVE-2024-48949
The Elliptic package 6.5.5 for Node.js for EDDSA implementation does not perform the required check if the signature proof(s) is within the bounds of the order n of the base point of the elliptic curve, leading to signature malleability. Namely, the
verify
function inlib/elliptic/eddsa/index.js
omitssig.S().gte(sig.eddsa.curve.n) || sig.S().isNeg()
validation.This vulnerability could have a security-relevant impact if an application relies on the uniqueness of a signature.
CVE-2024-48948
The Elliptic prior to 6.6.0 for Node.js, in its for ECDSA implementation, does not correctly verify valid signatures if the hash contains at least four leading 0 bytes and when the order of the elliptic curve's base point is smaller than the hash, because of an _truncateToN anomaly. This leads to valid signatures being rejected. Legitimate transactions or communications may be incorrectly flagged as invalid.
GHSA-vjh7-7g9h-fjfh
Summary
Private key can be extracted from ECDSA signature upon signing a malformed input (e.g. a string or a number), which could e.g. come from JSON network input
Note that
elliptic
by design accepts hex strings as one of the possible input typesDetails
In this code: https://github.com/indutny/elliptic/blob/3e46a48fdd2ef2f89593e5e058d85530578c9761/lib/elliptic/ec/index.js#L100-L107
msg
is a BN instance after conversion, butnonce
is an array, and different BN instances could generate equivalent arrays after conversion.Meaning that a same
nonce
could be generated for different messages used in signing process, leading tok
reuse, leading to private key extraction from a pair of signaturesSuch a message can be constructed for any already known message/signature pair, meaning that the attack needs only a single malicious message being signed for a full key extraction
While signing unverified attacker-controlled messages would be problematic itself (and exploitation of this needs such a scenario), signing a single message still should not leak the private key
Also, message validation could have the same bug (out of scope for this report, but could be possible in some situations), which makes this attack more likely when used in a chain
PoC
k
reuse exampleFull attack
This doesn't include code for generation/recovery on a purpose (bit it's rather trivial)
Output:
Similar for
ed25519
, but due to lown
, the key might not match precisely but is nevertheless equivalent for signing:restored
is equal toorig
modN
.Impact
Full private key extraction when signing a single malicious message (that passes
JSON.stringify
/JSON.parse
)Elliptic's verify function omits uniqueness validation
CVE-2024-48949 / GHSA-434g-2637-qmqr
More information
Details
The Elliptic package 6.5.5 for Node.js for EDDSA implementation does not perform the required check if the signature proof(s) is within the bounds of the order n of the base point of the elliptic curve, leading to signature malleability. Namely, the
verify
function inlib/elliptic/eddsa/index.js
omitssig.S().gte(sig.eddsa.curve.n) || sig.S().isNeg()
validation.This vulnerability could have a security-relevant impact if an application relies on the uniqueness of a signature.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Elliptic's EDDSA missing signature length check
CVE-2024-42459 / GHSA-f7q4-pwc6-w24p
More information
Details
In the Elliptic package 6.5.6 for Node.js, EDDSA signature malleability occurs because there is a missing signature length check, and thus zero-valued bytes can be removed or appended.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Elliptic's ECDSA missing check for whether leading bit of r and s is zero
CVE-2024-42460 / GHSA-977x-g7h5-7qgw
More information
Details
In the Elliptic package 6.5.6 for Node.js, ECDSA signature malleability occurs because there is a missing check for whether the leading bit of r and s is zero.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Elliptic allows BER-encoded signatures
CVE-2024-42461 / GHSA-49q7-c7j4-3p7m
More information
Details
In the Elliptic package 6.5.6 for Node.js, ECDSA signature malleability occurs because BER-encoded signatures are allowed.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Valid ECDSA signatures erroneously rejected in Elliptic
CVE-2024-48948 / GHSA-fc9h-whq2-v747
More information
Details
The Elliptic prior to 6.6.0 for Node.js, in its for ECDSA implementation, does not correctly verify valid signatures if the hash contains at least four leading 0 bytes and when the order of the elliptic curve's base point is smaller than the hash, because of an _truncateToN anomaly. This leads to valid signatures being rejected. Legitimate transactions or communications may be incorrectly flagged as invalid.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Elliptic's private key extraction in ECDSA upon signing a malformed input (e.g. a string)
GHSA-vjh7-7g9h-fjfh
More information
Details
Summary
Private key can be extracted from ECDSA signature upon signing a malformed input (e.g. a string or a number), which could e.g. come from JSON network input
Note that
elliptic
by design accepts hex strings as one of the possible input typesDetails
In this code: https://github.com/indutny/elliptic/blob/3e46a48fdd2ef2f89593e5e058d85530578c9761/lib/elliptic/ec/index.js#L100-L107
msg
is a BN instance after conversion, butnonce
is an array, and different BN instances could generate equivalent arrays after conversion.Meaning that a same
nonce
could be generated for different messages used in signing process, leading tok
reuse, leading to private key extraction from a pair of signaturesSuch a message can be constructed for any already known message/signature pair, meaning that the attack needs only a single malicious message being signed for a full key extraction
While signing unverified attacker-controlled messages would be problematic itself (and exploitation of this needs such a scenario), signing a single message still should not leak the private key
Also, message validation could have the same bug (out of scope for this report, but could be possible in some situations), which makes this attack more likely when used in a chain
PoC
k
reuse exampleFull attack
This doesn't include code for generation/recovery on a purpose (bit it's rather trivial)
Output:
Similar for
ed25519
, but due to lown
, the key might not match precisely but is nevertheless equivalent for signing:restored
is equal toorig
modN
.Impact
Full private key extraction when signing a single malicious message (that passes
JSON.stringify
/JSON.parse
)Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:N
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
indutny/elliptic (elliptic)
v6.6.1
Compare Source
v6.6.0
Compare Source
v6.5.7
Compare Source
v6.5.6
Compare Source
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.