Oct 24, 2026·4 min read·40 visits
Unchecked instance-aware parameters in @azure/msal-node ConfidentialClientApplication allow remote attackers to redirect token requests and expose confidential client authentication credentials to arbitrary hosts.
An origin validation vulnerability in @azure/msal-node allows attackers to process unchecked authorization code response payloads or request query parameters in ConfidentialClientApplication, potentially directing sensitive client credentials to external endpoints.
CVE-2026-109461 is an Origin Validation Error (CWE-346) in @azure/msal-node, the Microsoft Authentication Library for Node.js. The flaw specifically affects the ConfidentialClientApplication class in package versions starting from 5.0.0 up to but not including 7.1.0.
Confidential client applications run on secure servers and use sensitive credentials, such as client secrets, private key certificates, or federated identity assertions, to authenticate against Microsoft Entra ID (formerly Azure AD). The MSAL library incorporates instance-aware authentication options to dynamically resolve tenant endpoints and cloud instance routing, such as national cloud deployment hosts.
Due to insufficient origin validation and missing parameter sanitization in affected library releases, an attacker capable of manipulating response parameters can inject custom routing flags into token requests. This enables an attacker to force a confidential server-side application to route OAuth token requests—including client credentials—to an unauthorized host.
The root cause of this vulnerability lies in how ConfidentialClientApplication handled authorization code response payloads (authCodePayload) and extra query parameters passed into token acquisition methods. When processing authorization responses, the library forwarded raw parameter maps directly to the core base class handlers without enforcing validation or stripping non-essential fields.
Specifically, the acquireTokenByCode() method accepted an optional authCodePayload object containing key-value pairs derived from the authorization server redirect. In vulnerable versions, this object could include instance-aware host metadata override keys, such as cloud_instance_host_name, cloud_graph_host_name, or msgraph_host.
Because ConfidentialClientApplication failed to sanitize this structure, untrusted host metadata parameters were passed down to base authority resolution modules. Consequently, the library reconstructed token endpoints using caller-supplied host strings rather than restricting communication to pre-configured authority endpoints, introducing a credential reflection risk.
The fix was applied in commit f550958586475dbfeb1cd44be14a2d653728850e within pull request #8901. The maintainers implemented explicit checks against instanceAware configurations for confidential clients and introduced strict payload sanitization in acquireTokenByCode().
In ConfidentialClientApplication.ts, constructor-level enforcement was introduced to explicitly reject applications configured with instanceAware: true. Additionally, getAuthCodeUrl() was updated to throw a NodeAuthError if extraQueryParameters.instance_aware is provided.
// lib/msal-node/src/client/ConfidentialClientApplication.ts
constructor(configuration: Configuration) {
+ if (
+ "instanceAware" in configuration.auth &&
+ configuration.auth.instanceAware === true
+ ) {
+ throw NodeAuthError.createUnsupportedCcaInstanceAwareError();
+ }
super(configuration);
}
public async acquireTokenByCode(
request: AuthorizationCodeRequest,
authCodePayload?: AuthorizationCodePayload
): Promise<AuthenticationResult> {
+ // Strictly extract permitted parameters and drop unvalidated routing metadata
+ const sanitizedAuthCodePayload = authCodePayload
+ ? {
+ code: request.code,
+ state: authCodePayload.state,
+ nonce: request.nonce,
+ }
+ : undefined;
+ return super.acquireTokenByCode(request, sanitizedAuthCodePayload);
}The implementation drops all unexpected properties from authCodePayload, ensuring that injected cloud instance parameters cannot alter the destination endpoint during token exchanges.
To exploit this flaw, an attacker must influence the parameter payload supplied to acquireTokenByCode() or the initial request options supplied to getAuthCodeUrl(). This usually requires a scenario where authorization code responses or web query strings are parsed by an application and directly passed to MSAL methods without validation.
In a standard authorization code flow, the client application receives redirect parameters containing code and state. If the application passes an unvetted parameter map containing injected query parameters like cloud_instance_host_name=attacker.com, the library prior to version 7.1.0 parsed attacker.com as a valid authority target.
When acquireTokenByCode() completes the authorization code exchange, it issues an HTTP POST request containing client_secret or private key JWT assertions. If the authority target has been diverted, this HTTP request is transmitted directly to attacker.com, disclosing the server's confidential client credentials.
The vulnerability carries a CVSS v3.1 score of 5.9 (Medium) with vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N. The High Confidentiality impact rating reflects the danger of disclosing confidential client credentials.
Successful compromise of confidential client credentials enables an attacker to impersonate the backend application within Microsoft Entra ID. Depending on the assigned application permissions (such as Microsoft Graph application permissions), an attacker could gain persistent, unauthorized access to organizational resources, user directories, or cloud services.
The Attack Complexity is rated High because successful exploitation requires specific client implementation conditions, such as passing unsanitized HTTP query parameters into MSAL invocation methods or the presence of parameter injection vectors in upstream authentication flows.
Organizations using @azure/msal-node should immediately upgrade to version 7.1.0 or higher to eliminate this origin validation flaw.
Package updates can be installed using npm or yarn:
npm install @azure/msal-node@^7.1.0Additionally, developers should audit authorization handling code to ensure that application logic does not directly pass raw, unvalidated req.query objects into MSAL functions. Explicitly validating redirect parameters against expected schemas provides defense-in-depth.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
@azure/msal-node Microsoft | >= 5.0.0, < 7.1.0 | 7.1.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-346 (Origin Validation Error) |
| Attack Vector | Network (AV:N) |
| CVSS v3.1 Score | 5.9 (Medium) |
| EPSS Score | 0.00348 (27.14th percentile) |
| Impact | Information Disclosure (Confidential Client Credentials) |
| Exploit Status | None (No active public exploits reported) |
| CISA KEV Status | Not Listed |
The software does not properly verify that the source of data or a request is valid, allowing untrusted input to be accepted as if it came from a trusted origin.
An uncontrolled memory allocation vulnerability exists in ag-psd versions prior to 31.0.0. When parsing Adobe Photoshop Document (PSD) files, the readPsd() function reads image dimensions and color depth directly from the file header and allocates off-heap typed arrays without validating whether the requested memory size is proportional to the input stream or bounded by operational thresholds. An unauthenticated attacker can supply a crafted 52-byte PSD payload that triggers an immediate 3.35 GB memory allocation, resulting in process termination via the operating system Out-Of-Memory (OOM) killer.
CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).
CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.
An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.