Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain write access to linked git repo
-
DeliveryCommit malicious Data Table JSON with crafted column name
-
ExploitWait for administrator to trigger Source Control Pull
-
Executionn8n imports file and concatenates column into SQL
-
PersistPostgreSQL executes injected query
-
ImpactExfiltrate or modify n8n database contents
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target n8n deployment uses PostgreSQL as its database backend (the flaw does not affect SQLite or MySQL deployments), that the Source Control feature is configured and pointing at a git repository where the attacker holds write/commit access, and that a legitimate n8n administrator manually triggers a Source Control Pull operation that imports the attacker-crafted Data Table JSON. The user-interaction and attacker-position requirements substantially limit realistic exploitation to environments where source-control sync is actively used and repository write access is broader than the n8n admin group. |
| Impact | The CVSS 4.0 base score of 8.9 (High) reflects network attack vector with low complexity but with attack requirements (AT:P) and active user interaction (UI:A) - namely an administrator triggering the Source Control Pull. EPSS is very low (0.04%, 12th percentile) and the CVE is not on CISA KEV, indicating no observed exploitation. The realistic risk is moderated by the chained prerequisites: PostgreSQL backend, Source Control enabled, attacker write access to the linked repository, and an admin-initiated pull. There is tension between the CVSS PR:N rating and the description, which effectively requires attacker control over a trusted git repository - defenders should treat this as a supply-chain/insider-style flaw rather than a remote unauthenticated internet-exposed bug. |
| Exploit ScenarioDerived | An attacker who has commit rights (e.g., a low-privileged maintainer or someone who compromises a developer account) on the git repository linked to an n8n instance pushes a malicious Data Table JSON file whose column name contains an SQL payload. When an n8n administrator later clicks Source Control Pull, n8n parses the file and concatenates the column name into a PostgreSQL statement, executing the attacker's SQL with the privileges of the n8n database user - enabling data exfiltration, modification, or further pivoting. No public exploit identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv5 – Jun 23, 2026
SQL injection in n8n workflow automation platform allows an attacker with write access to a connected git repository to execute arbitrary SQL against the internal PostgreSQL database when an administrator performs a Source Control Pull. The flaw stems from unsafe handling of column names within Data Table JSON files imported during sync. No public exploit identified at time of analysis, and EPSS exploitation probability is very low at 0.04%.
Earlier versions of this analysis (4)
SQL injection in n8n's Source Control Pull feature allows an attacker with write access to a connected git repository to execute arbitrary SQL against the internal PostgreSQL database. By committing a malicious Data Table JSON file containing a crafted column name, the attacker triggers injection when an administrator performs a Source Control Pull. No public exploit identified at time of analysis, and EPSS exploitation probability is very low (0.04%), but successful exploitation yields high confidentiality, integrity, and availability impact across the n8n stack.
SQL injection in n8n workflow automation platform allows attackers with write access to a connected Source Control git repository to inject malicious SQL via a crafted column name in a Data Table JSON file, which executes against the internal PostgreSQL database when an administrator performs a Source Control Pull. Affects n8n versions prior to 1.123.43, 2.20.7, and 2.21.1 when PostgreSQL is the database backend. No public exploit identified at time of analysis and EPSS probability is very low (0.04%), but the CVSS 4.0 score of 8.9 reflects the high impact on database confidentiality, integrity, and availability.
SQL injection in n8n workflow automation platform allows attackers with write access to a connected git repository to compromise the internal PostgreSQL database when an administrator triggers a Source Control Pull. The malicious payload is delivered via a crafted column name in a Data Table JSON file and executes against the backend during import. No public exploit identified at time of analysis, and EPSS probability is very low at 0.04%, but the CVSS 4.0 score of 8.9 reflects the high impact once the preconditions are met.
SQL injection in n8n's Source Control feature allows attackers with git repository write access to execute arbitrary SQL against the PostgreSQL backend when administrators pull malicious Data Table JSON files. The vulnerability requires a specific attack chain: attacker git repository access, Source Control feature enabled, PostgreSQL backend, and admin-triggered pull operation. Vendor-released patches are available across all affected version branches (1.x, 2.20.x, 2.21.x). No public exploit identified at time of analysis, and the multi-prerequisite exploitation path significantly limits real-world attack surface to supply chain or insider threat scenarios.
RemediationAI
Vendor-released patches are available: upgrade to n8n 1.123.43, 2.20.7, or 2.21.1 (or later) per the GitHub advisory at https://github.com/n8n-io/n8n/security/advisories/GHSA-mhrx-qhrj-673w. If immediate upgrade is not possible, disable the Source Control feature entirely when not required (this removes the import code path but also removes the workflow-sync capability), restrict write access to the connected git repository to a small set of fully trusted maintainers, and avoid performing Source Control Pull operations against any repository that may have been touched by untrusted contributors. These workarounds reduce but do not eliminate exposure and should be treated as short-term mitigations only.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
n8n is a Node.js-based workflow automation platform distributed via npm. Its Source Control feature synchronizes workflow and Data Table definitions with an external git repository. The vulnerability is a classic CWE-89 SQL injection: column names extracted from attacker-controlled Data Table JSON files are concatenated into SQL statements executed against the backing PostgreSQL instance without proper identifier quoting or allowlist validation. The flaw only manifests on PostgreSQL deployments - affected packages are npm/n8n versions below 1.123.43, the 2.20.x line before 2.20.7, and the 2.21.x line before 2.21.1.
Know when PostgreSQL gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Network-reachable via git but requires attacker write access to the linked repo (PR:L), admin-triggered pull (UI:R), and PostgreSQL backend plus Source Control enabled (AC:H); full DB compromise yields C/I/A:H.
Primary rating from Vendor (https://github.com/n8n-io/n8n).
CVSS VectorVendor: https://github.com/n8n-io/n8n
Lifecycle Timeline
6DescriptionCVE.org
Impact
An attacker with write access to the git repository connected to an n8n Source Control configuration could commit a malicious Data Table JSON file containing a crafted column name. When an administrator performed a Source Control Pull, n8n imported the file and could lead to SQL injection on the internal PostgreSQL instance.
Exploitation requires all of the following conditions:
- The n8n instance uses PostgreSQL as its database backend.
- The Source Control feature is enabled and connected to a repository the attacker can write to.
- An administrator triggers a Source Control Pull.
Patches
The issue has been fixed in n8n version 1.123.43, 2.20.7, and 2.21.1. 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:
- Disable the Source Control feature if it is not actively required.
- Restrict write access to the connected git repository to fully trusted users only.
- Avoid pulling from repositories that may have been modified by untrusted parties.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Executive ViewAI
A SQL injection vulnerability in n8n's source control integration could allow attackers with git repository write access to execute arbitrary SQL commands against the internal PostgreSQL database when administrators perform a sync operation. Organizations using n8n with git integration should prioritize patching to prevent potential unauthorized database access and data exfiltration.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-38486
GHSA-mhrx-qhrj-673w
NVD
CVE.org
EPSS
VulDB
Exploit-DB