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 package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| yapi-vendor (npm) | before 1.9.3 | GitHub Advisory Database |
| ymfe yapi | up to 1.9.2 | NVD |
All scores
| GitHub | 5.1medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| NVD | 5.1medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| NVD | 3.6low CVSS:2.0 | AV: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
| https://securitylab.github.com/advisories/GHSL-2020-228-YMFE-yapi | advisory, third-party-advisory | |
| https://github.com/YMFE/yapi/issues/2117 | third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-27884 | advisory | |
| https://github.com/YMFE/yapi/issues/2263 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-27884 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2h3h-vw8r-82rp changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2021-27884 changed 2026-06-17 | Public domain |