Skip to main content

node-oauth2-server CVE-2026-41213

| EUVDEUVD-2026-25272 MEDIUM
Improper Restriction of Excessive Authentication Attempts (CWE-307)
2026-04-23 GitHub_M
5.9
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Intercept OAuth authorization code
  2. Delivery
    Submit token request with guessed code_verifier
  3. Exploit
    Receive invalid_grant on mismatch (code not consumed)
  4. Execution
    Repeat with next verifier guess
  5. Persist
    Match weak verifier
  6. Impact
    Receive bearer access token

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Brute-force prevention, rate limiting
Exploitation Conditions

Exploitation requires two concurrent conditions: (1) the attacker must have already obtained a valid, unexpired authorization code for the target - this requires a prior attack step such as redirect manipulation, referrer header leakage, or network interception of the OAuth callback; and (2) the client application must have generated a code_verifier shorter than 43 characters (non-RFC-compliant), creating a feasible brute-force space. Without condition (2), even with an intercepted code, a 43-128 character high-entropy verifier cannot be brute-forced online. What limits exploitation: the high-complexity prerequisite of code interception, the dependency on client-side RFC non-compliance for weak verifiers, and the online nature of the attack (rate limiting or monitoring on the token endpoint can detect and block repeated invalid_grant responses). This vulnerability does not affect plain (non-PKCE) authorization code flows or flows using code_verifier values of 43+ characters.

Impact

The CVSS 3.1 score of 5.9 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N) accurately reflects the attack prerequisites: high complexity is warranted because exploitation requires a prior out-of-band interception of the victim's authorization code - a non-trivial step that typically demands a man-in-the-middle position or redirect manipulation. Once the code is obtained, however, the brute-force phase is straightforward, as confirmed by the advisory PoC which succeeded in 26 attempts against a single-character verifier. EPSS at 0.05% (14th percentile) and the SSVC 'Automatable: no' designation both reflect this prerequisite dependency - mass exploitation without code interception is not feasible. The SSVC exploitation status of 'poc' confirms a public working exploit exists. Real-world risk is conditional: deployments are only vulnerable when clients generate verifiers shorter than 43 characters (non-RFC-compliant clients), which is the key amplifying factor. Fully RFC 7636-compliant clients using 43-128 character verifiers are not meaningfully exposed because brute-forcing high-entropy verifiers is computationally infeasible. The CVSS C:H rating is accurate - successful exploitation yields full bearer token access.

Exploit ScenarioDerived

An attacker positions themselves to intercept the authorization code issued to a client application - for example, by exploiting an open redirect on the client's redirect_uri or sniffing an insecure callback channel. The attacker then submits repeated POST requests to the /token endpoint with the stolen code and single-character code_verifier guesses (a through z); because each failed guess leaves the authorization code valid, the attacker iterates through the verifier space until the correct value returns HTTP 200 with bearer tokens. The advisory's confirmed PoC shows success in 26 attempts against a one-character verifier.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

PKCE code_verifier validation in @node-oauth/oauth2-server (versions <= 5.2.1) does not enforce RFC 7636 ABNF requirements, accepting arbitrarily short values including single-character strings for S256 flows. An attacker who intercepts an authorization code can brute-force the code_verifier online because failed attempts do not consume the code, allowing repeated guesses until token issuance succeeds. A working proof-of-concept is publicly documented in the GitHub security advisory; no active exploitation confirmed in CISA KEV.

RemediationAI

The primary fix is upgrading @node-oauth/oauth2-server to version 5.3.0, which enforces RFC 7636 ABNF validation (43-128 unreserved characters) on code_verifier before the hash comparison in the authorization code grant flow. The advisory is available at https://github.com/node-oauth/oauth2-server/security/advisories/GHSA-jhm7-29pj-4xvf. If immediate upgrade is not possible, a specific compensating control is to enforce code_verifier length and charset validation at the application or API gateway layer before requests reach the token endpoint - reject any code_verifier shorter than 43 characters or containing characters outside the RFC 7636 unreserved set. A secondary workaround is to configure the authorization server to invalidate authorization codes after any failed token exchange attempt, removing the retry window; this trades usability (legitimate transient failures also consume the code) for security. There is no compensating control that addresses the format-enforcement gap within the library itself prior to patching.

Affected VersionsENISA

node-oauth2-server < 5.3.0

Affected Packages

npm @node-oauth/oauth2-server fix: 5.3.0
euvd node_oauth2_server fix: 5.3.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected library (cpe:2.3:a:node-oauth:node-oauth2-server:*:*:*:*:*:*:*:*) implements OAuth2 authorization flows in Node.js, including PKCE (RFC 7636), which protects authorization code grants against interception attacks. RFC 7636 mandates that code_verifier be a high-entropy string of 43-128 unreserved characters. The root cause (CWE-307: Improper Restriction of Excessive Authentication Attempts) manifests in two distinct defects: first, lib/pkce/pkce.js only checks that the verifier is a non-empty string before hashing for S256, never enforcing the 43-character minimum or charset; second, AuthorizationCodeGrantType.handle revokes the authorization code only after verifier comparison succeeds, meaning invalid guesses fail before revocation and the same code remains valid for unlimited subsequent attempts. The combination of weak server-side format enforcement and non-consuming failed attempts eliminates the entropy guarantee PKCE is designed to provide.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 5.9 MEDIUM

AC:H reflects mandatory prior auth-code interception; PR:N because the token endpoint is publicly accessible; C:H because success yields bearer tokens; I:N and A:N because no data is modified and no service is disrupted.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

3
Patch released
Apr 25, 2026 - 02:16 nvd
Patch available
Patch available
Apr 23, 2026 - 20:31 EUVD
CVE Published
Apr 23, 2026 - 18:33 nvd
MEDIUM 5.9

DescriptionCVE.org

@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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% exploitable
Prevalence
Medium
popular Node.js OAuth2 server npm library, widely used but not universal
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy