NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🦀 crates.io
Not in CISA KEV

`Slip10Like` derivation method instantiated with certain curves may allow attacker to find derivation path which results into very long derivation (possible DoS)GHSA-2ff4-xfpr-m32r

Fix: LFDT-Lockness/hd-wallet@a7e3770

GHSA-2ff4-xfpr-m32r is a security vulnerability in hd-wallet. A fix is available for hd-wallet — see the affected versions and patch details below.

Published
Updated
Affected
2 pkgs
Patched
1 / 2
Exploits
None indexed
Exploitation data as of Dec 18, 2024 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

2 pkgs affected
🦀hd-wallet🦀slip-10

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

Description

Impact

<!-- _What kind of vulnerability is it? Who is impacted?_ -->

Impacted are the only ones who use hd_wallet::Slip10Like or slip_10 derivation method instantiated with curves other than secp256k1 and secp256r1.

hd_wallet crate used to provide Slip10Like derivation method, which is also provided in slip-10 crate as a default derivation method. It's based on slip10 method that searches for a valid child key in an infinite loop until it's found.

Theoretically, this could be exploited by an attacker by finding a derivation path that would force someone to execute a lot of iterations of this loop to find a valid child key. This attack, however, requires the probability of getting an invalid scalar from random 32 bytes to be high. Slip10 is protected from this attack as it's only defined on secp256k1 and secp256r1 curves, for which such probability is very low:

  • For secp256k1, probability is $< 2^{-127}$. This means that a loop with 2 or more iterations is vanishingly impossible.
  • For secp256r1, probability is $< 2^{-32}$. This means that a loop with 5 or more iterations is vanishingly impossible.

While standard curves are safe to use with slip10, we used to allow slip10-like derivation which can be instantiated with any curve. For instance, one could instantiate it with ed25519 or stark curves, for which probability of getting invalid scalar from random 32 bytes is >90%, so theoretically, attacker could try to DoS such construction.

Patches

<!-- _Has the problem been patched? What versions should users upgrade to?_ -->

hd_wallet v0.6.0 has been patched by removing slip10-like derivation from public API.

If you need HD derivation on other curves than secp256k1 and secp256r1, we suggest you to use:

Both derivation methods are non-standard, but secure and efficient.

If you're still using slip_10 and would like to migrate to patched version, please migrate to hd_wallet v0.6. You may first migrate from slip_10 v0.4 to hd_wallet v0.5 by following migration instructions available in the docs, and then upgrade from hd_wallet v0.5 to hd_wallet v0.6.

Workarounds

Technically, you don't need to upgrade if you don't use slip10-like derivation instantiated with other curves than secp256k1 or secp256r1.

However, if you do, migrating to other derivation method might be required.

Reach out to us in Discord

If you want to reach out to us, feel free to write to #lockness room in Discord

Credits

Thanks to Alessio Marziali [email protected] for discovering and flagging this issue

Affected Packages

2 total 1 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.iohd-walletall versions0.6.0cargo update -p hd-wallet --precise 0.6.0
🦀crates.ioslip-10all versionsNo fix

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for hd-wallet, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update hd-wallet to 0.6.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-2ff4-xfpr-m32r is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Frequently Asked Questions

### Impact <!-- _What kind of vulnerability is it? Who is impacted?_ --> **Impacted are the only ones who use [`hd_wallet::Slip10Like`](https://docs.rs/hd-wallet/0.5.1/hd_wallet/struct.Slip10Like.html) or [`slip_10`](https://docs.rs/slip-10/latest/slip_10/) derivation method instantiated with curves other than secp256k1 and secp256r1.** `hd_wallet` crate used to provide `Slip10Like` derivation method, which is also provided in `slip-10` crate as a default derivation method. It's based on [slip10](https://github.com/satoshilabs/slips/blob/master/slip-0010.md) method that searches for a valid
O3 Security · Impact-Aware SCA

Is GHSA-2ff4-xfpr-m32r in your dependencies?

Find it across crates.io, including transitive dependencies.

`Slip10Like` derivation method instantiated with certain…