Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-8q6v-474h-whgg

Опубликовано: 06 авг. 2025
Источник: github
Github: Прошло ревью
CVSS4: 6.9

Описание

The Thinbus Javascript Secure Remote Password (SRP) Client Generates Fewer Bits of Entropy Than Intended

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 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:

// WRONG var hexLength = this.toHex(N).length; // CORRECT var hexLength = this.toHex(this.N()).length;

Пакеты

Наименование

thinbus-srp

npm
Затронутые версииВерсия исправления

< 2.0.1

2.0.1

EPSS

Процентиль: 19%
0.00059
Низкий

6.9 Medium

CVSS4

Дефекты

CWE-331

Связанные уязвимости

nvd
6 месяцев назад

Thinbus Javascript Secure Remote Password is a browser SRP6a implementation for zero-knowledge password authentication. In versions 2.0.0 and below, a protocol compliance bug 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). 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. This is fixed in version 2.0.1.

EPSS

Процентиль: 19%
0.00059
Низкий

6.9 Medium

CVSS4

Дефекты

CWE-331