The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-42231

CVE-2026-42231: N8n Workflow Automation RCE Vulnerability

CVE-2026-42231 is a remote code execution flaw in N8n workflow automation platform caused by prototype pollution in xml2js. Attackers can exploit this to execute arbitrary code on the host system.

Published: May 7, 2026

CVE-2026-42231 Overview

CVE-2026-42231 is a prototype pollution vulnerability in n8n, an open source workflow automation platform. The flaw resides in the xml2js library used by n8n's webhook handler to parse XML request bodies. An authenticated user with permission to create or modify workflows can submit a crafted XML payload that pollutes the JavaScript object prototype. By chaining this pollution with the Git node's SSH operations, an attacker can achieve remote code execution on the n8n host.

The issue is fixed in versions 1.123.32, 2.17.4, and 2.18.1. The weakness is tracked under [CWE-1321] (Improperly Controlled Modification of Object Prototype Attributes).

Critical Impact

Authenticated workflow editors can pollute the JavaScript prototype chain through crafted XML webhook payloads and pivot to remote code execution on the n8n host via Git node SSH operations.

Affected Products

  • n8n versions prior to 1.123.32
  • n8n versions prior to 2.17.4
  • n8n version 2.18.0 and earlier in the 2.18.x branch

Discovery Timeline

  • 2026-05-04 - CVE-2026-42231 published to NVD
  • 2026-05-06 - Last updated in NVD database

Technical Details for CVE-2026-42231

Vulnerability Analysis

The vulnerability arises from how n8n processes XML webhook request bodies. The webhook handler delegates XML parsing to the xml2js library, which converts XML attributes and elements into JavaScript object properties. When the parser encounters specially crafted keys such as __proto__, constructor, or prototype, it writes attacker-controlled values onto Object.prototype. Every JavaScript object in the running n8n process then inherits the polluted properties.

Property pollution alone does not yield code execution. The exploit chain leverages the n8n Git node, which performs SSH operations and reads configuration values from objects that fall back to inherited properties. By poisoning fields the Git node consumes during SSH command construction, an attacker influences process spawning logic and executes arbitrary commands on the n8n host.

Root Cause

The xml2js parser used by n8n did not strip or reject XML keys that map to dangerous prototype attributes. Combined with downstream consumers that trusted inherited object properties, the parser became a sink for [CWE-1321] prototype pollution.

Attack Vector

Exploitation requires network access to the n8n instance and an authenticated account with workflow create or modify permissions. The attacker sends an XML payload to a webhook endpoint backed by a workflow that parses XML input. Once the prototype is polluted, executing a workflow that uses the Git node triggers SSH operations under attacker-controlled parameters, resulting in remote code execution in the context of the n8n process.

No public proof-of-concept code is referenced in the advisory. Refer to the n8n GitHub Security Advisory GHSA-q5f4-99jv-pgg5 for vendor-provided technical context.

Detection Methods for CVE-2026-42231

Indicators of Compromise

  • XML webhook payloads containing keys such as __proto__, constructor, or prototype reaching n8n endpoints.
  • Unexpected child processes spawned by the n8n Node.js process, particularly ssh, git, or shell interpreters with anomalous arguments.
  • Outbound SSH connections from the n8n host to destinations not present in legitimate workflow configurations.
  • Modifications to workflows that introduce Git nodes shortly after webhook activity from low-privilege accounts.

Detection Strategies

  • Inspect webhook request bodies for XML elements or attributes that match prototype pollution patterns and alert on matches.
  • Correlate workflow creation or update events with subsequent Git node executions originating from the same user session.
  • Baseline normal child process trees of the n8n service and flag deviations involving SSH or shell binaries.

Monitoring Recommendations

  • Forward n8n application logs, audit logs, and host process telemetry to a centralized analytics platform for correlation.
  • Track authenticated API calls that modify workflows, focusing on accounts with the workflow editor role.
  • Monitor egress network flows from n8n hosts on TCP/22 and other SSH-related ports for unexpected destinations.

How to Mitigate CVE-2026-42231

Immediate Actions Required

  • Upgrade n8n to 1.123.32, 2.17.4, or 2.18.1 depending on the deployed release branch.
  • Audit all user accounts with workflow create or modify permissions and revoke access that is not required.
  • Review recent workflow changes and webhook activity for indicators consistent with prototype pollution attempts.
  • Rotate SSH keys and credentials accessible to the n8n host if compromise is suspected.

Patch Information

The vendor has released fixed builds. Apply version 1.123.32 for the 1.x line, 2.17.4 for the 2.17 line, or 2.18.1 for the 2.18 line. See the n8n GitHub Security Advisory GHSA-q5f4-99jv-pgg5 for the complete fix description.

Workarounds

  • Restrict webhook endpoints to trusted networks using a reverse proxy or web application firewall until patching is complete.
  • Filter inbound XML payloads at the proxy layer to drop requests containing __proto__, constructor, or prototype keys.
  • Disable or remove Git node usage in workflows that are not strictly required to break the documented exploit chain.
  • Enforce least-privilege role assignments so that only trusted users can create or edit workflows that handle XML input.
bash
# Upgrade n8n via npm to a patched release
npm install -g n8n@2.18.1

# Or pull the patched Docker image
docker pull n8nio/n8n:2.18.1
docker stop n8n && docker rm n8n
docker run -d --name n8n -p 5678:5678 n8nio/n8n:2.18.1

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechN8n

  • SeverityCRITICAL

  • CVSS Score9.4

  • EPSS Probability0.27%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-1321
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-42234: N8n Workflow Automation RCE Vulnerability

  • CVE-2026-42232: N8n Workflow Automation RCE Vulnerability

  • CVE-2026-33696: n8n Workflow Automation RCE Vulnerability

  • CVE-2026-33660: n8n Workflow Automation RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English