CVE-2025-54885: Thinbus SRP Client Generates Insufficient Entropy
Summary
CVE-2025-54885: 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). Affects thinbus-srp versions < 2.0.1. Fixed in 2.0.1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Thinbus-srp is a JavaScript implementation of the Secure Remote Password (SRP) protocol, which is used for secure password authentication. It allows clients to authenticate to servers without transmitting passwords directly, enhancing security. However, a protocol compliance bug in versions prior to 2.0.1 leads to a significant vulnerability where the client generates insufficient entropy for key exchange.
Vulnerability Detail
The vulnerability arises from a bug in the thinbus-srp-npm package, where the client generates a fixed 252 bits of entropy instead of the required 2048 bits as per RFC 5054. This flaw reduces the security margin of the protocol, making it practically exploitable. The client public value is derived from a private value that is 4 bits below the specification, which compromises the intended security of the key exchange process.
How To Fix
Minimum fixed version
2.0.1
This is the first release that contains the fix.
npm install thinbus-srp@2.0.1
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If you cannot upgrade to the patched version, you can apply the following code workaround to your legacy version:
// WRONG
var hexLength = this.toHex(N).length;
// CORRECT
var hexLength = this.toHex(this.N()).length;
Conclusion
The vulnerability identified as CVE-2025-54885 in the thinbus-srp package poses a significant risk due to insufficient entropy generation during key exchange. It is crucial to update to version 2.0.1 or later to ensure the security of your application. If immediate updates are not feasible, applying the provided workaround can help mitigate the risk.
See every vulnerability recorded for thinbus-srp →
FAQ
CVE-2025-54885 is a vulnerability in the thinbus-srp package that causes the client to generate insufficient entropy for secure key exchange.
This vulnerability can potentially allow attackers to exploit the weakened security of the key exchange process, compromising the confidentiality of user credentials.
All versions of thinbus-srp prior to 2.0.1 are affected by this vulnerability.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.
If you cannot upgrade to the patched version, implement the provided code workaround to mitigate the risk until you can update.