/

CVE-2026-72851

Severity:

CRITICAL RISK

(10.0)

SQL Injection (CWE-89) in Budibase Webhook Automations

CVE-2026-72851

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized database access, data exfiltration, data modification, and persistence

Severity:

CRITICAL RISK

(10.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Budibase contains an unauthenticated SQL injection vulnerability in webhook-triggered automations that use EXECUTE_QUERY steps. An attacker who can submit JSON to the webhook endpoint may influence database queries executed with builder-configured credentials, potentially exposing or changing data in connected datasources.

Affected context

The vulnerability occurs in Budibase deployments where:

  • A webhook trigger starts an automation
  • The automation includes an EXECUTE_QUERY step
  • Request-controlled JSON values influence SQL construction or execution
  • The resulting query runs with credentials configured by the application builder

The risk is especially significant when connected datasources contain sensitive information or permit write operations.

Exploit preconditions

  • Attack surface: Webhook trigger endpoint exposed to a network-accessible client
  • Required access: Ability to submit requests to the webhook; authentication may not be required
  • Trigger point: Execution of an automation containing an EXECUTE_QUERY step
  • Why exploitation is possible: Attacker-controlled request data can reach SQL execution logic without sufficient separation from query structure, allowing database commands to be interpreted as part of the query

Why this happens

The underlying bug is improper separation between untrusted webhook input and SQL statements. When request-controlled values are incorporated into database queries without reliable parameterization or equivalent structural controls, an attacker may alter the intended query semantics.

This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly called SQL injection. The impact is amplified because the query executes using database credentials configured for the automation rather than a narrowly scoped, per-request identity.

Potential impact

  • Sensitive records may be read or exfiltrated
  • Database records may be modified or deleted
  • Attackers could alter application or automation state
  • Connected datasources may be used to establish persistence
  • Business workflows and downstream systems could be disrupted
  • Higher-privileged database access could enable broader compromise

General mitigation guidance

Mitigation generally focuses on preventing webhook data from becoming executable SQL structure.

Common defensive patterns include:

  • Use parameterized queries and prepared statements for all request-derived values
  • Prefer query builders or allowlisted query templates that separate data from SQL syntax
  • Validate inputs against explicit type, length, format, and value constraints
  • Reduce trust in webhook payloads and avoid accepting arbitrary query fragments
  • Apply least-privilege permissions to datasource credentials, separating read and write roles where practical
  • Restrict webhook exposure with authentication, authorization, network controls, and request signing where appropriate
  • Treat errors and query responses as sensitive to reduce information leakage

How teams detect issues like this

Detection approaches commonly include:

  • Static analysis for string concatenation, interpolation, or templating of request data into SQL
  • Code review checks for EXECUTE_QUERY steps that consume webhook fields without parameter binding
  • Tests using benign boundary and metacharacter inputs to verify that query structure remains unchanged
  • Runtime monitoring for unusual webhook request volumes, database errors, query patterns, and access to unrelated tables
  • Policy enforcement requiring parameterized queries and least-privilege datasource credentials
  • Automated security review tools that flag SQL construction from untrusted sources

Sources

SourceLink
github.comgithub.com/Budibase/budibase/security/advisories/GHSA-x7h8-ww3q-xv7c
vulncheck.comvulncheck.com/advisories/budibase-before-sql-injection-via-unauthenticated-webhook

Frequently asked

questions

Yes. It may be exploitable over the network when a webhook trigger endpoint is reachable and accepts attacker-controlled requests.

The vulnerability is described as unauthenticated, so a valid application account may not be required. Network reachability and an exposed webhook trigger remain important conditions.

Ensure every value derived from webhook input is passed through parameterized query interfaces or tightly allowlisted query templates, rather than being concatenated into SQL.

Combine parameterized queries, strict input validation, authenticated webhook controls, monitoring, and narrowly scoped datasource permissions.

Find out what's already
exploitable in your codebase.