The Thinbus Javascript Secure Remote Password (SRP) Client Generates Fewer Bits of Entropy Than Intended
Moderate severity
GitHub Reviewed
Published
Aug 5, 2025
in
simbo1905/thinbus-srp-npm
•
Updated Aug 7, 2025
Description
Published to the GitHub Advisory Database
Aug 6, 2025
Reviewed
Aug 6, 2025
Published by the National Vulnerability Database
Aug 7, 2025
Last updated
Aug 7, 2025
Impact
A protocol compliance bug in thinbus-srp-npm versions prior to 2.0.1 causes the client to generate a fixed 252 bits of entropy instead of the intended bit length of the safe prime (defaulted to 2048 bits). RFC 5054 states in section 2.5.4 Client Key Exchange
The client public value is being generated from a private value that is 4 bits below the specification. This reduces the protocol's designed security margin it is now practically exploitable. The servers full sized 2048 bit random number is used to create the shared session key and password proof.
Patches
The issue is fixed in versions >= 2.0.1
Workarounds
It is possible to patch a legacy version:
References