{"id":"CVE-2021-27884","aliases":["CVE-2021-27884","GHSA-2h3h-vw8r-82rp"],"related":[],"kind":"vulnerability","state":"published","title":"Weak JSON Web Token in yapi-vendor","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.&#xa0;Esto ocurre porque se usa Math.random en Node.js","source":"nvd"}],"published":"2021-03-01T23:00:51.000Z","modified":"2026-06-17T03:45:33.210Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":5.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":5.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:L/AC:L/Au:N/C:P/I:P/A:N","score":3.6,"rating":"LOW"}],"cwes":["CWE-330"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.9.3"}],"ecosystem":"npm","package":"yapi-vendor","purl":"pkg:npm/yapi-vendor","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"1.9.2"}],"vendor":"ymfe","product":"yapi","cpe":"cpe:2.3:a:ymfe:yapi:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2020-228-YMFE-yapi","tags":["advisory","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/YMFE/yapi/issues/2117","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27884","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/YMFE/yapi/issues/2263","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-27884","url":"https://www.cve.org/CVERecord?id=CVE-2021-27884","licence":"CVE Terms of Use","modified":"2024-08-03T21:33:16.428Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2h3h-vw8r-82rp","url":"https://github.com/advisories/GHSA-2h3h-vw8r-82rp","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:25.888Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-27884","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27884","licence":"Public domain","modified":"2026-06-17T03:45:33.210Z"}],"updatedAt":"2026-11-25T22:58:00.107Z","epss":{"score":0.00342,"percentile":0.29754,"date":"2026-12-01T12:00:22.000Z"}}