{"id":"CVE-2021-41580","aliases":["CVE-2021-41580","GHSA-f794-r6xc-hf3v"],"related":[],"kind":"vulnerability","state":"published","title":"Improper Access Control in passport-oauth2","summary":"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","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"**EN DISPUTA** El paquete passport-oauth2 versiones anteriores a 1.6.1 para Node.js maneja inapropiadamente la condición de error de no poder obtener un token de acceso. Esto es explotable en determinados casos de uso en los que un proveedor de identidad OAuth utiliza un código de estado HTTP 200 para los informes de error de autenticación-fracaso, y una aplicación concede la autorización al recibir simplemente el token de acceso (es decir, no intenta usar el token). NOTA: el proveedor de passport-oauth2 no considera esto una vulnerabilidad de passport-oauth2","source":"nvd"}],"published":"2021-09-27T06:11:20.000Z","modified":"2026-06-17T04:08:40.853Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-287"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.6.1"}],"ecosystem":"npm","package":"passport-oauth2","purl":"pkg:npm/passport-oauth2","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.6.1"}],"vendor":"passportjs","product":"passport-oauth2","cpe":"cpe:2.3:a:passportjs:passport-oauth2:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/jaredhanson/passport-oauth2/pull/144","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jaredhanson/passport-oauth2/commit/8e3bcdff145a2219033bd782fc517229fe3e05ea","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jaredhanson/passport-oauth2/compare/v1.6.0...v1.6.1","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41580","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/jaredhanson/passport-oauth2","tags":["package"],"sources":["ghsa"]},{"url":"https://medium.com/passportjs/no-access-token-no-service-7fb017c9e262","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-41580","url":"https://www.cve.org/CVERecord?id=CVE-2021-41580","licence":"CVE Terms of Use","modified":"2024-08-04T03:15:29.285Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f794-r6xc-hf3v","url":"https://github.com/advisories/GHSA-f794-r6xc-hf3v","licence":"CC-BY-4.0","modified":"2023-11-08T04:06:59.967Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-41580","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41580","licence":"Public domain","modified":"2026-06-17T04:08:40.853Z"}],"updatedAt":"2026-11-25T22:58:04.158Z","epss":{"score":0.01303,"percentile":0.71369,"date":"2026-12-02T12:00:21.000Z"}}