CVE-2025-54885: Thinbus srp The Thinbus Javascript Secure Remote Vulnerability

MODERATE
Advisory Identifier: GHSA-8q6v-474h-whgg
CWE-331
Published
Advisory Summary

CVE-2025-54885 is a MODERATE the thinbus javascript secure remote vulnerability (CWE-331: Insufficient Entropy) affecting Thinbus srp libraries in the npm ecosystem. The issue involves the thinbus javascript secure remote password (srp) client generates fewer bits of entropy than intended. Remediation is available by upgrading affected packages to version 2.0.1.

CVE-2025-54885 at a Glance

CVE Identifier CVE-2025-54885
GHSA Identifier GHSA-8q6v-474h-whgg
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-331: Insufficient Entropy
Affected Product Thinbus srp
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-54885

To remediate this vulnerability, upgrade all affected Thinbus srp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

thinbus-srp fixed: 2.0.1
npm install thinbus-srp@2.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls thinbus-srp

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-54885, inspect your project dependencies using npm:

npm ls thinbus-srp

Analyze the terminal output to locate any version of Thinbus srp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.1), your application is affected.

Note: The npm ls thinbus-srp command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-331: Insufficient Entropy, where the product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others. In Thinbus srp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 ](https://datatracker.ietf.org/doc/html/rfc5054#section-2.5.4) > The client key exchange message carries the client's public value (A). The client calculates this value as A = g^a % N, where a is a random number that SHOULD be at least 256 bits in length. 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: ```javascript // WRONG var hexLength = this.toHex(N).length; // CORRECT var hexLength = this.toHex(this.N()).length; ```

CVE-2025-54885 Affected Thinbus srp Versions

1 component(s)
Fixed Versions:
2.0.1
Product / Package Ecosystem Affected Versions Fixed Version
thinbus-srp
npm
< 2.0.1
2.0.1

References

Frequently Asked Questions

What is CVE-2025-54885?
CVE-2025-54885 is a security vulnerability in Thinbus srp involving The Thinbus Javascript Secure Remote Password (SRP) Client Generates Fewer Bits of Entropy Than Intended under CWE-331: Insufficient Entropy.
Which Thinbus srp versions are affected?
Affected versions include releases prior to 2.0.1 across affected packages: thinbus-srp.
What version fixes CVE-2025-54885?
Upgrading to 2.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is thinbus-srp affected?
Yes, thinbus-srp is affected in releases prior to 2.0.1. Upgrade your dependency to 2.0.1 or later.
What CWE is associated with CVE-2025-54885?
CVE-2025-54885 is classified under CWE-331: Insufficient Entropy (The product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others.).
How can I check npm dependencies for CVE-2025-54885?
Run the dependency tree command: 'npm ls thinbus-srp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8q6v-474h-whgg",
  "modified" : "2025-08-07T15:11:48Z",
  "published" : "2025-08-06T17:11:42Z",
  "aliases" : [ "CVE-2025-54885" ],
  "summary" : "The Thinbus Javascript Secure Remote Password (SRP) Client Generates Fewer Bits of Entropy Than Intended",
  "details" : "### Impact\nA 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 ](https://datatracker.ietf.org/doc/html/rfc5054#section-2.5.4)\n\n> The client key exchange message carries the client's public value\n   (A).  The client calculates this value as A = g^a % N, where a is a\n   random number that SHOULD be at least 256 bits in length.\n\nThe 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. \n\n### Patches\n\nThe issue is fixed in versions >= 2.0.1\n\n### Workarounds\n\nIt is possible to patch a legacy version: \n\n```javascript\n// WRONG\nvar hexLength = this.toHex(N).length;\n\n// CORRECT  \nvar hexLength = this.toHex(this.N()).length;\n```",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "thinbus-srp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/simbo1905/thinbus-srp-npm/security/advisories/GHSA-8q6v-474h-whgg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54885"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/simbo1905/thinbus-srp-npm/issues/28"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/simbo1905/thinbus-srp-npm/pull/30/commits/4aeaea2366e090765a8204059c7bcf3616438d31"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/simbo1905/thinbus-srp-npm/commit/aa7064c1db7294ce867e9bc92f26fa6c71a5a2cb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/simbo1905/thinbus-srp-npm"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-331" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-06T17:11:42Z",
    "nvd_published_at" : "2025-08-07T01:15:26Z"
  }
}