Read the docs
TI-2024-39080 Aliases GHSA-jp37-5qhw-mffw

Sharks has a Bias of Polynomial Coefficients in Secret Sharing

Priority LOW 38CWE-334Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
—
Confidentiality · integrity · availability
—
Fix status
No fix listed

No CVSS vector from any source. Fix status from GitHub.

Summary

Affected versions of this crate allowed for a bias when generating random polynomials for Shamir Secret Sharing, where instead of being within the range `[0, 255]` they were instead in the range `[1, 255]`. A description from Cure53, who originally found the issue, is available: > The correct method to select a random polynomial would be to select all coefficients (including the most significant coefficient) uniformly in the range 0..255 (inclusive). Otherwise, knowledge that a coefficient in a polynomial cannot be 0 permits the exclusion of single byte values for the shared secret given one share less than required. [...] Exploiting this weakness necessitates sharing the same secret multiple times. In this scenario, an attacker could exclude an exponential number of values for each of the shared bytes until sufficiently few values remain for brute forcing. Cure53 estimates that under ideal circumstances (e.g., a 2-out-of-N scheme) a shared secret can be reconstructed if the same secret has been distributed 500-1500 times. Secrets that have been shared a low amount of times (ideally, once) would not be impacted. However, secrets that are repeatedly shared may be vulnerable, especially if the shares are still available, and should be rotated. The vulnerability does not impact reconstitution of secrets: secrets that have already been split can be recombined without issue. The flaw can be corrected by changing the lower bound of the polynomial coefficient range in the `sharks::math::random_polynomial` function to `0`. The `blahaj` crate has been made available with a fixed version of the code, after attempts to reach the maintainer of the `sharks` crate were unsuccessful.

Why it matters now

Fix No fix listed No fixed version in the sources yet

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—sharks (crates.io)up to 0.5.0—No fix listedGHSA-jp37-5qhw-mffw
  • sharks (crates.io) Vendor— Affected up to 0.5.0 Fixed in — No fix listed GHSA-jp37-5qhw-mffw

Remediation

No fixed version listed by the sources yet.

Timeline

  1. 2026-10-03 Threatist record created from GHSA-jp37-5qhw-mffw

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences