CVE-2026-109461 is an origin validation error (CWE-346) in MSAL Node's authorization code flow. The vulnerability allows an attacker to supply a malicious AuthorizationCodePayload (specifically the cloud_instance_host_name field) to ConfidentialClientApplication.acquireTokenByCode, causing the library to redeem the authorization code against an attacker-controlled token endpoint, thereby disclosing the authorization code and other parameters over the network.
The fix (PR #8901, commit f550958586475dbfeb1cd44be14a2d653728850e) addresses this in two ways:
- It overrides ConfidentialClientApplication.acquireTokenByCode to sanitize the AuthorizationCodePayload, discarding response-controlled routing/metadata fields (cloud_instance_host_name, cloud_instance_name, cloud_graph_host_name, msgraph_host, client_info) and only preserving code (from the request), state (for CSRF validation), and nonce (from the request).
- It rejects instance-aware configuration and the instance_aware extra query parameter for confidential clients.
The vulnerable call chain is: ConfidentialClientApplication.acquireTokenByCode (inherited from ClientApplication) -> ClientApplication.acquireTokenByCode -> AuthorizationCodeClient.acquireToken -> AuthorizationCodeClient.updateTokenEndpointAuthority, where the attacker-controlled cloud_instance_host_name is used to redirect the token endpoint. These are the functions that would appear in a runtime profile during exploitation.