GHSA-cwxv-4866-5gq2: Shamir backup recovery accepts a share at x = 0, so a supplied share can substitute the recovered private key
Published 2026-11-12 · Updated 2026-11-12 · Also known as RUSTSEC-2026-0501
Summary
The bsv-rs crate improperly validates Shamir backup shares by allowing an x-coordinate of 0, enabling an attacker to dictate the resulting private key. Users of the affected versions must update to the patched releases to ensure secure key reconstruction.
Who is affected
This vulnerability affects applications using KeyShares::from_backup_format to recover Shamir backups from untrusted or external sources. By providing a malicious share with an x-coordinate of 0, an attacker can force the system to reconstruct their own chosen key instead of the legitimate one. If the system relies on the reconstructed private key for authentication or signing, the integrity and confidentiality of the entire system are compromised.
Exploitability
The vulnerability is rated as critical with a CVSS 3.1 score of 9.1, reflecting a low attack complexity and the lack of required privileges or user interaction. There is no EPSS score available, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.
Remediation
- Upgrade bsv-rs to version 0.8.7 or later.
- For the 0.9.x development line, upgrade to 0.9.0-beta.7.0 or later.
- If upgrading is not possible, manually validate shares by ensuring the x-coordinate field is not zero or equal to/greater than the field prime, and verify that no two shares share the same x-coordinate.
How to check your project
- Check Cargo.toml for dependencies on bsv-rs within the affected version ranges: 0.0.0-0 to 0.8.6 or 0.9.0-beta.1 to 0.9.0-beta.6.
- Run 'cargo tree -p bsv-rs' to inspect the resolved version of the crate in the dependency graph.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| crates.io | bsv-rs |
>= 0.0.0-0, < 0.8.7 | 0.8.7 | cargo update -p bsv-rs --precise 0.8.7 |
| crates.io | bsv-rs |
>= 0.9.0-beta.1, < 0.9.0-beta.7.0 | 0.9.0-beta.7.0 | cargo update -p bsv-rs --precise 0.9.0-beta.7.0 |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | High |
| Integrity | High |
| Availability | None |
FAQ
Does this vulnerability affect shares produced by bsv-rs itself?
No. The crate's own writer does not produce shares that trigger this vulnerability; the issue is specifically within the reader logic.
What is the primary risk of this flaw?
The primary risk is a total loss of security in the key recovery process, allowing an attacker to force the reconstruction of a private key they control.
What is the CWE for this vulnerability?
Not documented.
Original advisory description
References
- PACKAGE https://crates.io/crates/bsv-rs
- ADVISORY https://rustsec.org/advisories/RUSTSEC-2026-0501.html
- WEB https://github.com/Calhooon/bsv-rs/blob/v0.8.7/CHANGELOG.md
- REPORT https://github.com/Calhooon/bsv-rs/issues/854
Source records: RUSTSEC-2026-0501 (OSV.dev).