Skip to content
Heist/ feed
Back to feed
Medium

@node-oauth/oauth2-server: PKCE code_verifier ABNF not enforced in token exchange allows brute-force redemption of intercepted authorization codes

Type: advisorySources: OSV

@node-oauth/oauth2-server is a module for implementing an OAuth2 server in Node.js. The token exchange path accepts RFC7636-invalid code_verifier values (including one-character strings) for S256 PKCE flows. Because short/weak verifiers are accepted and failed verifier attempts do not consume the authorization code, an attacker who intercepts an authorization code can brute-force code_verifier guesses online until token issuance succeeds.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-41213
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 01:16 UTC · Revision 1

Source evidence

@node-oauth/oauth2-server: PKCE code_verifier ABNF not enforced in token exchange allows brute-force redemption of intercepted authorization codes

core-osv · Original source

Published 23 Apr 2026, 18:33 UTC

@node-oauth/oauth2-server is a module for implementing an OAuth2 server in Node.js. The token exchange path accepts RFC7636-invalid code_verifier values (including one-character strings) for S256 PKCE flows. Because short/weak verifiers are accepted and failed verifier attempts do not consume the authorization code, an attacker who intercepts an authorization code can brute-force code_verifier guesses online until token issuance succeeds.

osv:CVE-2026-41213
Complete source record
{
  "id": "882220ab6e18cfead96d2574ead1b6ce32b11c9986113fce858f1d005aaecfee",
  "url": "https://osv.dev/vulnerability/CVE-2026-41213",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "@node-oauth/oauth2-server: PKCE code_verifier ABNF not enforced in token exchange allows brute-force redemption of intercepted authorization codes",
    "summary": "@node-oauth/oauth2-server is a module for implementing an OAuth2 server in Node.js. The token exchange path accepts RFC7636-invalid code_verifier values (including one-character strings) for S256 PKCE flows. Because short/weak verifiers are accepted and failed verifier attempts do not consume the authorization code, an attacker who intercepts an authorization code can brute-force code_verifier guesses online until token issuance succeeds.",
    "evidence": "osv:CVE-2026-41213",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-41213",
      "aliases": [
        "CVE-2026-41213",
        "GHSA-jhm7-29pj-4xvf"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/node-oauth/node-oauth2-server",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "cc70455a9496b184fd0caaadd79ba4b4002eb4c9"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "5.3.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:node-oauth:node-oauth\\/oauth2-server:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "5.3.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v5.2.2-rc.0",
            "v5.2.1",
            "v5.2.0",
            "v5.1.0",
            "v5.1.0-rc.0",
            "v4.0.0",
            "v3.1.1",
            "v3.1.0",
            "v3.0.2",
            "v3.0.0",
            "v3.0.0-b4",
            "v3.0.0-b3.1",
            "v3.0.0-b3",
            "v2.4.1",
            "v2.4.0",
            "v2.3.0",
            "v2.2.2",
            "v2.2.1",
            "v2.2.0",
            "v1.5.2",
            "v1.5.1",
            "v1.5.0",
            "v1.4.1",
            "v1.4.0",
            "v1.3.2",
            "v1.3.1",
            "v1.3.0",
            "v1.2.5",
            "v1.2.4",
            "v1.2.3",
            "v1.2.2",
            "v1.2.1",
            "v1.2.0",
            "v1.1.1",
            "v1.1.0",
            "v1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-41213.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.485791448Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41213.json",
        "https://github.com/node-oauth/node-oauth2-server/security/advisories/GHSA-jhm7-29pj-4xvf",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-41213"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-1289",
          "CWE-307"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41213.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-41213",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 521263,
  "published_at": "2026-04-23T18:33:42.365+00:00"
}