CriticalGHSA-h24c-6p6p-m3vx

tss-lib leaks secret keys in response to incorrectly constructed Paillier moduli

Published 1 Sept 2023 · Updated 1 Sept 2023

Is your project on an affected github.com/bnb-chain/tss-lib?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<=1.3.5
Fixed in
No fix released

Details

Impact

The specification of the GG18 threshold ECDSA signature protocol contains a vulnerability allowing an attacker to recover the shared secret key. If a participant generates a Paillier modulus N containing small factors (less than 2^100) they can interact with other participants in the signing protocol to steal their secret key shares in as little as sixteen signing attempts. The master key can then be reconstructed from these shares.

Patches

The implementation of GG18 in tss-lib did not prove that N is biprime or that it doesn't contain small factors. The fixed implementation adds the following proofs from the CGGMP21 threshold ECDSA protocol to the key generation:

  • Paillier-Blum Modulus (N is the product of two primes)
  • No Small Factor (both factors of N are greater than 2^256)

These proofs apply to both the Paillier encryption modulus N, and the modulus NTilde used in MTA proofs.

To address the issue in the resharing protocol, an additional round has been added to the end so that participants can confirm that they received valid proofs.

References

Is GHSA-h24c-6p6p-m3vx in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/bnb-chain/tss-lib, and gives you the command that fixes it.

More advisories for github.com/bnb-chain/tss-lib

  • LowCVE-2023-26557Timing attack from non-constant time scalar arithmetic in github.com/bnb-chain/tss-lib · 11 Jul 2023
  • LowCVE-2022-47931Collision of hash values in github.com/bnb-chain/tss-lib · 11 Jul 2023
  • LowCVE-2022-47930Replay attacks involving proofs in github.com/bnb-chain/tss-lib · 11 Jul 2023
  • LowCVE-2023-26556Timing attack from non-constant time scalar multiplication in github.com/bnb-chain/tss-lib · 11 Jul 2023
  • CriticalCVE-2023-26556IO FinNet tss-lib vulnerable to timing attack from non-constant time scalar multiplication · 21 Apr 2023
  • HighCVE-2023-26557IO FinNet tss-lib vulnerable to timing attack from non-constant time scalar arithmetic · 21 Apr 2023
All 9 advisories for github.com/bnb-chain/tss-lib

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.