CVE-2021-27884
JSON

5.1medium

Weak JSON Web Token in yapi-vendor

Severity
5.1medium CVSS:3.1 by NVD
Exploit likelihood
0.34% (higher than 29% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-2h3h-vw8r-82rp

Description

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
yapi-vendor (npm)before 1.9.3GitHub Advisory Database
ymfe yapiup to 1.9.2NVD

All scores

GitHub5.1medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
NVD5.1medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
NVD3.6low CVSS:2.0AV:L/AC:L/Au:N/C:P/I:P/A:N

Classification

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

La generación de secretos de firma débil de JSON Web Token (JWT) en YMFE YApi versiones hasta 1.9.2, permite la recreación de los tokens JWT de otros usuarios. Esto ocurre porque se usa Math.random en Node.js

References

Sources

SourceRecordLicence
CVE ListCVE-2021-27884 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-2h3h-vw8r-82rp changed 2023-11-08CC-BY-4.0
NVDCVE-2021-27884 changed 2026-06-17Public domain