# CVE-2021-41580: Improper Access Control in passport-oauth2

- Severity: Medium 5.3 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.30%, higher than 71% of CVEs (2026-12-02)
- Published: 2021-09-27T06:11:20.000Z
- Modified: 2026-06-17T04:08:40.853Z
- Also known as: GHSA-f794-r6xc-hf3v
- Weaknesses: CWE-287
- Assigned by: mitre

## Description

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

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- passport-oauth2 (npm): before 1.6.1
- passportjs passport-oauth2: before 1.6.1

## Every score

- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`

## References

- <https://github.com/jaredhanson/passport-oauth2/pull/144> (patch, third-party-advisory, web)
- <https://github.com/jaredhanson/passport-oauth2/commit/8e3bcdff145a2219033bd782fc517229fe3e05ea> (patch, third-party-advisory, web)
- <https://github.com/jaredhanson/passport-oauth2/compare/v1.6.0...v1.6.1> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-41580> (advisory)
- <https://github.com/jaredhanson/passport-oauth2> (package)
- <https://medium.com/passportjs/no-access-token-no-service-7fb017c9e262> (web)

## Sources

- CVE List: [CVE-2021-41580](https://www.cve.org/CVERecord?id=CVE-2021-41580), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-f794-r6xc-hf3v](https://github.com/advisories/GHSA-f794-r6xc-hf3v), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-41580](https://nvd.nist.gov/vuln/detail/CVE-2021-41580), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-41580 · Whole record: https://cve.day/CVE-2021-41580.json · Rebuilt by cve.day 2026-11-25T22:58:04.158Z
