VDB
Sign up
MEDIUM5.1

GHSA-2h3h-vw8r-82rp

Weak JSON Web Token in yapi-vendor

Quick fix

GHSA-2h3h-vw8r-82rp — yapi-vendor: upgrade to the fixed version with the command below.

npm install yapi-vendor@1.9.3

Details

Weak JSON Web Token (JWT) signing secret generation in YMFE YApi through 1.9.2 allows recreation of other users' JWT tokens. This occurs because Math.random in Node.js is used as a source of randomness in jwt signing. Math.random does not provide cryptographically secure random numbers. This has been patched in version 1.9.3.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/yapi-vendor
Introduced in: 0Fixed in: 1.9.3
Fixnpm install yapi-vendor@1.9.3

References