Live threats

All CVEs / Passportjs

CVE-2021-41580Passportjs Passport-oauth2

Medium 5.3 No auth needed

Priority
47
CVSS 3.1
5.3
EPSS
1.3%
probability of exploitation in 30 days · percentile 71
Auth required
No
Published
Sep 27, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

What happens

The passport-oauth2 package before 1.6.1 for Node.js mishandles the error condition of failure to obtain an access token. This is exploitable in certain use cases where an OAuth identity provider uses an HTTP 200 status code for authentication-failure error reports, and an application grants authorization upon simply receiving the access token (i.e., does not try to use the token). NOTE: the passport-oauth2 vendor does not consider this a passport-oauth2 vulnerability

Original NVD text.

What to do

  1. Apply the vendor's security update for Passport-oauth2.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm passport-oauth2 < 1.6.1 1.6.1 npm install passport-oauth2@1.6.1

Per OSV / GitHub Advisories (GHSA-f794-r6xc-hf3v). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
passportjspassport-oauth2< 1.6.1

Official sources

References

Links published by the sources. Open them with care.