Improper Access Control in passport-oauth2
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | passport-oauth2 | < 1.6.1 | 1.6.1 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-41580
- https://github.com/jaredhanson/passport-oauth2/pull/144
- https://github.com/jaredhanson/passport-oauth2/commit/8e3bcdff145a2219033bd782fc517229fe3e05ea
- https://github.com/jaredhanson/passport-oauth2
- https://github.com/jaredhanson/passport-oauth2/compare/v1.6.0...v1.6.1
- https://medium.com/passportjs/no-access-token-no-service-7fb017c9e262
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N- Weakness (CWE)
CWE-287- Platform
- npm
- Package
passport-oauth2- Disclosed
- 29.09.2021
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-f794-r6xc-hf3v - CC BY 4.0
Vulnerability history: passport-oauth2
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.