CVE-2026-34825: NocoBase Has SQL Injection via template variable substitution in workflow SQL node

Published Apr 1, 2026
·
Updated

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:

typescript // SQLInstruction.ts:28 const sql = processor.getParsedValue(node.config.sql || '', node.id).trim();

Then executes the resulting string directly:

typescript // 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: sql 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

1. Login as admin 2. Create a collection-trigger workflow on the users table (mode: after create) 3. Add a SQL node with: sql SELECT id, nickname, email FROM users WHERE nickname = '{{$context.data.nickname}}' 4. Enable the workflow 5. Create a user with nickname set to: ' UNION SELECT 1,version(),currentuser -- 6. Check execution result:

json [ { "id": 1, "nickname": "PostgreSQL 16.13 (Debian 16.13-1.pgdg13+1) on x8664-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:

diff // 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: ... });

Other sources

NocoBase is an AI-powered no-code/low-code platform for building business applications and enterprise solutions. Prior to version 2.0.30, NocoBase 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. This issue has been patched in version 2.0.30.

MITRE

Affected Software

2 affected componentsFixes available
npm/@nocobase/plugin-workflow-sql<=2.0.29
2.0.30
NocoBase NocoBase<2.0.30

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@nocobase/plugin-workflow-sql to a version that resolves this vulnerability.

    Fixed in 2.0.30
  2. Upgrade

    Upgrade NocoBase plugin-workflow-sql to a version that resolves this vulnerability.

    Fixed in 2.0.30
  3. Configuration

    Replace direct template-variable string substitution in workflow SQL nodes (SQLInstruction.ts line 28 uses processor.getParsedValue()) with parameterized/bind queries using Sequelize bind parameters, e.g. generate SQL like: SELECT * FROM users WHERE nickname = '{{$context.data.nickname}}' and execute via sequelize.query(sql, { bind: ... }) rather than executing a fully interpolated raw SQL string.

    NocoBase plugin-workflow-sql (SQLInstruction.ts) SQL template substitution = Use Sequelize bind parameters instead of direct string substitution via getParsedValue()

Event History

Apr 1, 2026
Advisory Published
via GitHub·11:44 PM
Data Sourced
via GitHub·11:44 PM
DescriptionWeaknessAffected Software
Apr 2, 2026
CVE Published
via MITRE·07:06 PM
Data Sourced
via MITRE·07:06 PM
DescriptionWeakness
Data Sourced
via NVD·08:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203