CVE-2021-27884 — yapi-vendor
MEDIUMCVE-2021-27884 is a medium-severity (CVSS 5.1) Insufficient Random Values vulnerability in yapi-vendor. A fix is available for yapi-vendor — see the affected versions and patch details below.
Weak JSON Web Token in yapi-vendor
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
yapi-vendornpmDescription
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | yapi-vendor | all versions | 1.9.3npm install yapi-vendor@1.9.3 |
Affected Products
yapiymfeDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for yapi-vendor, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update yapi-vendor to 1.9.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-27884 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2021-27884 in your dependencies?
Find it across npm, including transitive dependencies.