CVE-2021-41580Passportjs Passport-oauth2
Medium 5.3 No auth needed
Follow: this CVE · Passportjs · Passportjs Passport-oauth2 We alert you by email or Slack (account required).
- 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
What to do
- Apply the vendor's security update for Passport-oauth2.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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)
| Vendor | Product | Versions |
|---|---|---|
| passportjs | passport-oauth2 | < 1.6.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Patch Third Party Advisory
- github.com Patch Third Party Advisory