Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-41580

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-41580
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:21 UTC · Revision 1

Source evidence

CVE-2021-41580

core-osv · Original source

Published 27 Sept 2021, 07:15 UTC

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

osv:CVE-2021-41580
Complete source record
{
  "id": "6b564e41c31a12160027a997fa3dcb5e4d60e2f157113d06ad7830f68d8b03f2",
  "url": "https://osv.dev/vulnerability/CVE-2021-41580",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-41580",
    "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",
    "evidence": "osv:CVE-2021-41580",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-41580",
      "aliases": [
        "CVE-2021-41580",
        "GHSA-f794-r6xc-hf3v"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/jaredhanson/passport-oauth2",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "ee3fe9f17c0f3a90f2d9d938f267e9942b9fba49"
                },
                {
                  "fixed": "8e3bcdff145a2219033bd782fc517229fe3e05ea"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:passportjs:passport-oauth2:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.6.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "8e3bcdff145a2219033bd782fc517229fe3e05ea"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.6.0",
            "v1.5.0",
            "v1.4.0",
            "v1.3.0",
            "v1.2.0",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41580.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:01.319374935Z",
      "provider": "osv",
      "references": [
        "https://github.com/jaredhanson/passport-oauth2/commit/8e3bcdff145a2219033bd782fc517229fe3e05ea",
        "https://github.com/jaredhanson/passport-oauth2/compare/v1.6.0...v1.6.1",
        "https://github.com/jaredhanson/passport-oauth2/pull/144"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-41580",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 384816,
  "published_at": "2021-09-27T07:15:06.803+00:00"
}