{"id":"CVE-2021-27884","aliases":["EUVD-2021-0584","GHSA-2h3h-vw8r-82rp"],"status":"published","title":"Weak JSON Web Token in yapi-vendor","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.","severity":{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.00338,"percentile":0.276,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-330"],"published":"2021-03-01T23:00:51Z","modified":"2026-10-20T10:54:35Z","fixes":[{"ecosystem":"npm","package":"yapi-vendor","fixed_in":["1.9.3"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"yapi-vendor","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.9.2"},{"fixed":"1.9.3"}]}]},{"source":"osv","ecosystem":"npm","package":"yapi-vendor","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.9.3"}]}]}],"products":[{"vendor":"ymfe","product":"yapi"}],"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2020-228-YMFE-yapi","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory"]},{"url":"https://github.com/YMFE/yapi/issues/2117","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27884","tags":["advisory"]},{"url":"https://github.com/YMFE/yapi/issues/2263","tags":["web"]},{"url":"https://github.com/advisories/GHSA-2h3h-vw8r-82rp"}],"sources":{"cve":[{"id":"CVE-2021-27884","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.","status":"published","published":"2021-03-01T23:00:51Z","modified":"2024-08-03T21:33:16.428Z","updated_at":"2026-11-02T14:33:04.360272Z"}],"euvd":[{"id":"EUVD-2021-0584","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.","status":"published","published":"2021-03-01T23:00:51Z","modified":"2024-08-03T21:33:16Z","updated_at":"2026-11-03T03:24:48.366655Z"}],"ghsa":[{"id":"GHSA-2h3h-vw8r-82rp","title":"Weak JSON Web Token in yapi-vendor","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 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.","status":"published","published":"2021-03-26T16:49:26Z","modified":"2023-02-01T05:05:14Z","cvss":[{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-330"],"updated_at":"2026-11-02T14:36:33.613868Z"}],"nvd":[{"id":"CVE-2021-27884","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.","status":"published","published":"2021-03-01T23:15:13.267Z","modified":"2026-06-17T03:45:33.21Z","cvss":[{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":3.6,"vector":"AV:L/AC:L/Au:N/C:P/I:P/A:N","level":"low","assessor":"primary"}],"cwes":["CWE-330"],"updated_at":"2026-11-02T14:06:50.399901Z"}],"osv":[{"id":"CVE-2021-27884","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.","status":"published","published":"2021-03-01T23:15:13.267Z","modified":"2026-10-20T10:54:35.64901806Z","cvss":[{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:19.129331Z"},{"id":"GHSA-2h3h-vw8r-82rp","title":"Weak JSON Web Token in yapi-vendor","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 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.","status":"published","published":"2021-03-26T16:49:26Z","modified":"2023-11-08T04:05:25.888063Z","cvss":[{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-330"],"updated_at":"2026-11-02T15:46:34.338541Z"}]}}
