Executive brief
Thinbus is a JavaScript library that implements Secure Remote Password (SRP) authentication, a protocol used to enable secure password-based login without transmitting passwords over the network. A bug in the client code causes it to generate random values with only 252 bits of entropy instead of the intended 2048 bits, weakening the cryptographic security of the authentication protocol and making it practically exploitable to compromise user accounts.
Technical details
The vulnerability is a protocol compliance bug where the client calculates its public key exponent using a private value with only 252 bits of entropy instead of the RFC 5054-compliant minimum of 256 bits (or the intended 2048 bits of the safe prime). The root cause is incorrect variable reference in the entropy generation code: the code references the static value N instead of calling the dynamic method this.N(). This significantly reduces the cryptographic security margin of the handshake. The vulnerability affects the SRP client key exchange where the client's public value A = g^a % N is computed from a weakened random exponent. No authentication is required to exploit this—an attacker can perform offline cryptanalysis or brute-force attacks against the reduced entropy space. The vulnerability is fixed in version 2.0.1 and later.
Affected products
- Thinbus thinbus-srp < 2.0.1
Timeline
- 2025-08-06: disclosed
- 2025-08-06: patched: Fixed in version 2.0.1