CVE-2021-27884 Weak JSON Web Token in yapi-vendor

Medium 5.1 Published Updated

Weak JWT secret generation allows attackers to forge tokens and take over other users' accounts in YApi.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2021-27884?

CVE-2021-27884 is a medium-severity vulnerability in n/a, published on 1 Mar 2021. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-330

Which versions are affected by CVE-2021-27884?

2 open source packages ship an affected version, including yapi-vendor. It affects 1 product.

PackageAffectedFixed in
yapi-vendor npmAll versions1.9.3
yapi-vendor npmAll versions1.9.3

Products include Ymfe Yapi.

How do I fix CVE-2021-27884?

Upgrade yapi-vendor to 1.9.3 or later.

Is CVE-2021-27884 being exploited?

There is no known exploitation of CVE-2021-27884 in the wild and no public exploit code.

Sources

Also known as GHSA-2h3h-vw8r-82rp.

Is CVE-2021-27884 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free