PostgreSQL
CVE-2026-34825
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticated user creates workflow with SQL node
-
ExploitUser supplies template variable with malicious SQL payload
-
ExecutiongetParsedValue() substitutes payload into raw SQL string
-
ImpactArbitrary SQL executes against database
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 | Requires authenticated user with permission to create or modify NocoBase workflows containing SQL nodes. User-controlled data must be incorporated as template variables in the SQL query within the workflow. Affects NocoBase <= 2.0.8 plugin-workflow-sql component. |
| Impact | This vulnerability presents critical real-world risk despite the absence of CVSS scoring. Authentication is required (workflow trigger access), but exploitation complexity is low-attackers need only craft malicious input values when triggering workflows containing SQL nodes with template variables. The publicly available proof-of-concept demonstrates trivial exploitation using UNION-based injection techniques. While no CISA KEV entry exists indicating mass exploitation campaigns, the public POC and detailed technical disclosure significantly lower the barrier to exploitation. The attack is partially automatable once an attacker identifies workflows with vulnerable SQL nodes and determines how to trigger them. Technical impact is severe: confidentiality, integrity, and availability are all compromised through full database access. The primary limiting factor is that exploitation requires both authenticated workflow trigger capability AND the presence of admin-configured SQL nodes using user-controlled template variables-this reduces the attack surface compared to unauthenticated vulnerabilities, but any NocoBase deployment using workflow SQL automation with external data sources remains at critical risk. Organizations should treat this as high priority given the combination of low exploitation complexity, public POC availability, and catastrophic impact potential. |
| Exploit ScenarioDerived | An authenticated attacker with permission to create user accounts or trigger collection-based workflows identifies that the NocoBase deployment uses a workflow with a SQL node querying user data. The workflow contains a template like SELECT * FROM users WHERE nickname = '{{$context.data.nickname}}'. The attacker creates a new user account with the nickname field set to a malicious payload: ' UNION SELECT 1,password_hash,email FROM admin_credentials--. When the workflow executes, the unescaped template substitution produces the SQL query SELECT * FROM users WHERE nickname = '' UNION SELECT 1,password_hash,email FROM admin_credentials--', which returns administrator password hashes and email addresses in the workflow execution results accessible to the attacker. With database credentials extracted, the attacker escalates to full database access, exfiltrating sensitive application data or modifying records to grant themselves administrative privileges within NocoBase. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 02, 2026
SQL injection in NocoBase plugin-workflow-sql through version 2.0.8 allows authenticated workflow users to execute arbitrary database queries. The vulnerable SQLInstruction class performs unparameterized string substitution of template variables (e.g., {{$context.data.fieldName}}) directly into raw SQL statements, enabling attackers to break out of string literals and inject malicious SQL commands. Publicly available exploit code exists demonstrating UNION-based injection to extract database credentials and system information. With default Docker deployments granting superuser database privileges, attackers gain full read/write access to the database including credential extraction, data modification, and table deletion capabilities.
RemediationAI
Upgrade to NocoBase version containing the patch commit 75da3dddc4aba739c398f7072725dcf7f5487f5c or later, which implements parameterized query binding for template variable substitution. The vendor-released patch replaces direct string concatenation with Sequelize bind parameters, preventing SQL injection by treating user input as data rather than executable SQL syntax. Apply the fix from the official GitHub repository at https://github.com/nocobase/nocobase/commit/75da3dddc4aba739c398f7072725dcf7f5487f5c. As an interim mitigation, audit all existing workflows containing SQL nodes to identify those using template variables from user-controlled sources, and either disable those workflows or refactor them to avoid direct user input in SQL templates. Implement database user privilege restrictions following principle of least privilege-ensure the NocoBase database user does not have superuser or DDL permissions unless absolutely necessary. Review and restrict which user roles have permissions to trigger workflows that execute SQL operations.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
NocoBase is a no-code/low-code application platform built on Node.js and Sequelize ORM. The plugin-workflow-sql package (pkg:npm/@nocobase_plugin-workflow-sql) enables workflow automation with SQL execution capabilities. The vulnerability stems from CWE-89 (SQL Injection) in the SQLInstruction class, where the getParsedValue() method performs client-side template variable substitution before passing the concatenated string to Sequelize's query() method. Unlike Sequelize's built-in parameterized query features (bind parameters), this implementation treats user-controlled workflow trigger data as trusted input and directly interpolates it into SQL strings. The affected code path processes workflow context data from collection triggers, where field values like nickname or email can contain attacker-controlled payloads. In PostgreSQL deployments (commonly used with NocoBase Docker images on Debian), the default database user typically has elevated privileges, amplifying the impact from information disclosure to full database compromise.
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:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Primary rating from Vendor (https://github.com/nocobase/nocobase) · only source for this CVE.
CVSS VectorVendor: https://github.com/nocobase/nocobase
Lifecycle Timeline
2DescriptionCVE.org
Summary
NocoBase <= 2.0.8 plugin-workflow-sql substitutes template variables directly into raw SQL strings via getParsedValue() without parameterization or escaping. Any user who triggers a workflow containing a SQL node with template variables from user-controlled data can inject arbitrary SQL.
Affected Versions
- Affected: all versions through 2.0.8
Details
The SQLInstruction in packages/plugins/@nocobase/plugin-workflow-sql/src/server/SQLInstruction.ts line 28 processes SQL templates:
// SQLInstruction.ts:28
const sql = processor.getParsedValue(node.config.sql || '', node.id).trim();Then executes the resulting string directly:
// SQLInstruction.ts:35
const [result] = await collectionManager.db.sequelize.query(sql, {
transaction: this.workflow.useDataSourceTransaction(dataSourceName, processor.transaction),
});getParsedValue() performs simple string substitution of {{$context.data.fieldName}} placeholders with values from the workflow trigger data. No escaping, quoting, or parameterized binding is applied.
When an admin creates a SQL node with a template like:
SELECT * FROM users WHERE nickname = '{{$context.data.nickname}}'Any user who triggers the workflow with a crafted value can break out of the string literal and inject arbitrary SQL.
Proof of Concept
- Login as admin
- Create a collection-trigger workflow on the
userstable (mode: after create) - Add a SQL node with:
SELECT id, nickname, email FROM users WHERE nickname = '{{$context.data.nickname}}'- Enable the workflow
- Create a user with nickname set to:
' UNION SELECT 1,version(),current_user -- - Check execution result:
[
{
"id": 1,
"nickname": "PostgreSQL 16.13 (Debian 16.13-1.pgdg13+1) on x86_64-pc-linux-gnu...",
"email": "nocobase"
}
]The injected UNION SELECT returned the database version and current database user.
Impact
Full database read/write access through SQL injection. An attacker who can trigger a workflow with a SQL node containing template variables from user-controlled data can extract credentials, modify records, or drop tables. The severity depends on the database user's privileges (full superuser access in the default Docker deployment).
Suggested Fix
Use parameterized queries. Replace direct string substitution with Sequelize bind parameters:
// SQLInstruction.ts
- const sql = processor.getParsedValue(node.config.sql || '', node.id).trim();
+ const { sql, bind } = processor.getParsedValueAsParams(node.config.sql || '', node.id);
const [result] = await collectionManager.db.sequelize.query(sql, {
+ bind,
transaction: ...
});Executive ViewAI
NocoBase plugin-workflow-sql versions through 2.0.8 contains a SQL injection vulnerability that allows authenticated workflow users to execute arbitrary database queries and extract sensitive data including credentials. In default Docker deployments with superuser privileges, a compromised or malicious workflow user can achieve full database compromise including credential theft and data destruction, directly impacting data confidentiality and availability.
Apply vendor patch. If immediate patching is unavailable: (1) restrict workflow SQL task creation to administrators only via role-based access controls; (2) implement database-level query audit logging to detect injection attempts; (3) revoke superuser database privileges and provision application service account with SELECT-only permissions on data tables; (4) implement Web Application Firewall rules to block SQL keywords in workflow variable inputs; (5) isolate affected NocoBase instances from production data until patched.
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.
Affected Products (CPE)CVE.org
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
GHSA-vx58-fwwq-5g8j
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB