NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-109461: MSAL Node authorization code flow may disclose parameters to an attacker-controlled endpoint

highCVSS 3.1 7.5GHSA-xcx6-jx8p-x3h5

@azure/msal-node from 5.0.0-beta.0 up to 7.1.0 has an origin validation error in the authorization code flow. Parameters from the redirect response can steer the library to an attacker-controlled endpoint and disclose information. Upgrade to 7.1.0, or pass only the auth code to acquireTokenByCode.

Published Oct 23, 2026 · Analysis Nov 1, 2026

What an attacker can do

In the authorization code flow, a Node.js app receives a redirect carrying a code and other values, and calls acquireTokenByCode to redeem it. In affected versions, the library trusted routing and metadata fields in that response, such as the instance host name, when it chose where to send the redemption request (CWE-346). An attacker who can shape the redirect parameters can point the library at a server they control, and the request sent there discloses sensitive data. Microsoft rates confidentiality impact high.

An attacker needs no privileges, but must get crafted parameters into the callback the app passes to the library, for example through a crafted link the user follows. The advisory does not say exactly which values are disclosed. A confidential-client web app is the likely setting, since the fix targets confidential clients. The data might include the authorization code and the client credential used to redeem it, but the sources do not confirm that.

The fix keeps only the returned state from the response and takes code and nonce from the original request, and drops routing fields such as cloud_instance_host_name.

Who is affected

The npm package @azure/msal-node, versions from 5.0.0-beta.0 up to but not including 7.1.0. It matters for apps that use the authorization code flow and pass response parameters to acquireTokenByCode. Check the installed version:

npm ls @azure/msal-node

@azure/msal-node

Ecosystem
npm
Affected
>= 5.0.0-beta.0, < 7.1.0
Fixed in
7.1.0
Check
npm ls @azure/msal-node

How to fix it

Upgrade to @azure/msal-node 7.1.0 or later.

npm install @azure/[email protected]

The 7.1.0 release sanitizes authorization code payloads and rejects unsupported instance-aware inputs for confidential clients (pull request 8901). The advisory's workaround: pass only the auth code to acquireTokenByCode, not the whole response object.

How to tell if you were hit

Review your callback handler. If it passes the full query object from the redirect to acquireTokenByCode, it takes the extra parameters. In logs, look for callbacks with unexpected query parameters such as cloud_instance_host_name or cloud_instance_name, and for outbound requests from the server to hosts other than your identity provider's login endpoints.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

Origin validation error in Microsoft Authentication Library (MSAL) for Node.js allows an unauthorized attacker to disclose information over a network. This affects the auth_code flow.

Patches

Version 7.1.0 and higher are patched.

Workarounds

Ensure you pass in only the auth_code to to acquireTokenByCode

Questions

Is msal-node 7.0.x affected by CVE-2026-109461?

Yes. Versions from 5.0.0-beta.0 up to 7.1.0 are affected. 7.1.0 and later are patched.

Is there a workaround if I cannot upgrade?

Yes. The advisory says to pass in only the auth code to acquireTokenByCode, not the full redirect response.

Is it exploited in the wild?

No source reports exploitation, and it is not in CISA's KEV catalog.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More npm vulnerabilities

All npm entries