AgentbeamBeta
AI agent vulnerability · n8n

CVE-2026-33720: n8n Has Authorization Bypass in OAuth Callback via N8N_SKIP_AUTH_ON_OAUTH_CALLBACK

mediumCVSS 4.0 6.3 · 3.1 4.7GHSA-vpgc-2f6g-7w7x

n8n before 2.8.0 skips the ownership check on the OAuth state parameter when N8N_SKIP_AUTH_ON_OAUTH_CALLBACK is set to true. An attacker can trick a victim into finishing an OAuth flow against the attacker's credential, so the victim's tokens land in it. Fixed in n8n 2.8.0. The setting is off by default.

Published Mar 25, 2026 · Analysis Nov 14, 2026

What an attacker can do

In an OAuth flow, n8n carries a state value that ties the callback to the credential and the user who started it. With N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=true, the callback handler does not verify that the person completing the flow owns that state. The attacker starts an OAuth flow on a credential object they control and gets the victim to complete it, for example by sending the authorization link.

The provider then returns the victim's tokens to n8n, and n8n stores them in the attacker's credential. The attacker can then run workflows against the victim's connected account, such as a mailbox or a CRM, in the victim's name.

The attacker needs no n8n account on the callback path, but needs the victim to click and approve. The CVSS 3.1 vector reflects high attack complexity and user interaction, with low confidentiality and integrity impact, and a changed scope. Instances that did not set the variable are not affected.

Who is affected

n8n below 2.8.0, and only if the environment variable N8N_SKIP_AUTH_ON_OAUTH_CALLBACK is set to true. Check both:

npm ls -g n8n
env | grep N8N_SKIP_AUTH_ON_OAUTH_CALLBACK

For Docker or Compose, look in the container environment or the compose file.

n8n

Ecosystem
npm
Affected
< 2.8.0
Fixed in
2.8.0
Check
npm ls n8n

How to fix it

Upgrade to n8n 2.8.0 or later:

npm install -g [email protected]

For Docker, pull a newer image and recreate the container. Short-term, the advisory says not to enable N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=true unless strictly required, and to limit access to fully trusted users. It says these do not fully remove the risk.

How to tell if you were hit

Check whether N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=true is set in your deployment. Review OAuth credentials for ones you do not recognize, or that are connected to a different account than expected, and check which user owns them. Look for workflow runs that use those credentials. The advisory gives no log signature.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

When the N8N_SKIP_AUTH_ON_OAUTH_CALLBACK environment variable is set to true, the OAuth callback handler skips ownership verification of the OAuth state parameter. This allows an attacker to trick a victim into completing an OAuth flow against a credential object the attacker controls, causing the victim's OAuth tokens to be stored in the attacker's credential. The attacker can then use those tokens to execute workflows in their name.

  • This issue only affects instances where N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=true is explicitly configured (non-default).

Patches

The issue has been fixed in n8n version 2.8.0. Users should upgrade to this version or later to remediate the vulnerability.

Workarounds

If upgrading is not immediately possible, administrators should consider the following temporary mitigations:

  • Avoid enabling N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=true unless strictly required.
  • Restrict access to the n8n instance to fully trusted users only.

These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.

Credited to subhanUmer.

Questions

Is every n8n instance below 2.8.0 exposed to CVE-2026-33720?

No. Only instances that set N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=true, which is non-default, are affected.

What does the attacker get?

The victim's OAuth tokens, stored in a credential the attacker controls. They can use them to run workflows against the victim's connected account.

Does it need user interaction?

Yes. The victim must complete the OAuth flow the attacker set up, for example by following a crafted authorization link.

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 n8n vulnerabilities

All n8n entries