Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
CriticalPublic exploit

Prototype Pollution to RCE in n8n Webhook XML Parser

IdentifiersCVE-2026-42231CWE-1321· Improperly Controlled Modification…

CVE-2026-42231 is a prototype pollution vulnerability in n8n caused by unsafe handling of XML request bodies in the webhook handler through the xml2js library. In n8n versions prior to 1.123.32, 2.17.4, and 2.18.1, a crafted XML payload can inject attacker-controlled properties into the JavaScript object prototype during XML parsing. An authenticated user with permission to create or modify workflows can exploit this condition within n8n's webhook processing path. The polluted prototype can then be chained with the Git node's SSH-related operations, resulting in remote code execution on the underlying n8n host.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can allow an authenticated attacker with workflow editing privileges to escalate from application-level access to arbitrary command execution on the n8n host. This can lead to full compromise of the n8n instance and potentially the underlying server, including unauthorized execution of commands, access to sensitive workflow data and credentials available to the process, service manipulation, persistence, and further lateral movement depending on host configuration.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, restrict workflow creation and modification permissions to fully trusted users only, since exploitation requires authenticated access with workflow editing rights. As an additional risk-reduction measure, minimize exposure of XML-processing webhooks where feasible and closely monitor webhook and workflow changes involving Git node SSH operations. These measures are temporary and do not fully eliminate the vulnerability.

Remediation

Patch, then assume compromise.

Upgrade n8n to a fixed release: 1.123.32, 2.17.4, 2.18.1, or later. Because the issue is rooted in XML parsing behavior in the webhook handler and can be chained to host-level code execution, patching to a vendor-fixed version is the primary remediation. After upgrading, review workflows and Git node usage for suspicious modifications and rotate any credentials that may have been exposed if compromise is suspected.
PUBLIC EXPLOITS

Exploits

1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.

VALID 1 / 1 TOTALView more in app
CVE-2026-42231MaturityPoCVerified exploit

Repository contains a standalone exploit PoC and a self-contained Docker lab for CVE-2026-42231 / GHSA-q5f4-99jv-pgg5 affecting n8n XML webhook parsing. The main exploit is the Python script `poc_GHSA-q5f4-99jv-pgg5.py`, which sends crafted XML payloads to an n8n webhook endpoint to trigger prototype pollution through xml2js parsing of dangerous names like `__proto__`, `constructor`, and `prototype`. The intended exploitation chain is: XML webhook input -> own enumerable dangerous property on parsed object -> persistence through JSON serialization -> prototype manipulation during later object copying/assignment -> influence of Git/simple-git configuration -> command execution during SSH-based Git operations. Repository structure: `poc_GHSA-q5f4-99jv-pgg5.py` is the primary network exploit; `verify_GHSA-q5f4-99jv-pgg5.js` is a local verifier that reproduces the vulnerable and fixed parser configurations and demonstrates the chain without a live target; `exploit.sh` automates lab setup, owner creation, login, workflow creation, activation, demo, exploit delivery, log viewing, and cleanup; `docker-compose.yml` provisions a vulnerable `n8nio/n8n:1.123.22` instance and an attacker container on a shared Docker network; `Dockerfile` packages the Python PoC; `requirements.txt` lists `requests`; `README.md` documents the vulnerability, prerequisites, payloads, and usage. Capabilities: the exploit can verify vulnerability in demo mode and deliver RCE-intent payloads in exploit mode. It targets public n8n webhook endpoints, especially workflows that later use a Git node with SSH. The helper script also fingerprints and manipulates n8n REST endpoints (`/rest/owner/setup`, `/rest/login`, `/rest/workflows`) to build a reproducible lab. Overall, this is a real exploit repository with both proof/verification and operational payload delivery components, not merely a detector.

rudSarkarDisclosed May 7, 2026dockerfilemarkdownwebnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
N8nN8napplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

ACTIVITY FEED

Recent activity

6 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.

No news coverage yet. Advisories and community discussion only.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity5

Community discussion across Reddit, Mastodon, and other social sources.