/

CVE-2026-122244

Severity:

HIGH RISK

(7.7)

Stored XSS (CWE-79) in Budibase Builder Preview UI

CVE-2026-122244

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79, CWE-116, CWE-1021

Impact:

Privileged session script execution and unauthorized Builder API actions

Severity:

HIGH RISK

(7.7)

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 can render attacker-controlled markup as raw HTML in Handlebars binding previews, allowing stored cross-site scripting. A BASIC user or an unauthenticated visitor to a public write form may be able to place a value in a shared datasource that later executes in a builder's or administrator's session when previewed.

Affected context

The issue occurs in Budibase Builder binding previews that display values from shared external datasources, including the Data-section Formula column editor and binding drawers. Risk arises when attacker-controlled strings or object keys reach the preview formatter and are inserted as raw HTML; the described Builder origin also lacks a Content-Security-Policy that would block the resulting script.

Exploit preconditions

  • Attack surface: Builder binding previews that surface values from a shared external datasource.
  • Required access: Ability to write to the datasource, which may be available to a BASIC application user or an unauthenticated visitor using a public write form.
  • Trigger point: A builder or administrator opens a relevant preview containing the stored value.
  • Why exploitation is possible: Formatting leaves raw strings and object keys unescaped, the preview inserts the result as HTML, and the Handlebars SafeString path preserves attacker-controlled content.

Why this happens

The underlying flaw is a stored cross-site scripting issue mapped to CWE-79: Improper Neutralization of Input During Web Page Generation. Data that should be treated as text is formatted without adequate HTML escaping and then inserted into the Builder interface as raw HTML. This also relates to CWE-116, because output encoding is missing, and CWE-1021, because browser-side security controls do not adequately restrict the rendered content.

Potential impact

  • Script may execute in a builder's or administrator's browser session.
  • An attacker could perform privileged Builder API actions in the affected session.
  • Workspace data may be exposed or modified within the victim's available permissions.
  • The issue could enable further compromise of applications managed in the workspace.

General mitigation guidance

Defensive patterns include treating datasource values as untrusted regardless of who can write them, and rendering them as text rather than raw HTML by default. Apply context-appropriate output encoding or use a narrowly configured HTML sanitizer when rich markup is required. Avoid preserving untrusted values through safe-string mechanisms, use a restrictive Content-Security-Policy as defense in depth, and limit the permissions available to Builder sessions and datasource writers.

How teams detect issues like this

Review rendering paths that pass datasource values through formatters, Handlebars bindings, or safe-string helpers before inserting content into the DOM. Static analysis and code review can flag raw HTML insertion, missing context-sensitive escaping, and unsafe handling of object keys or strings. Test preview surfaces with untrusted stored values, and enforce policies that require safe rendering APIs and an appropriate Content-Security-Policy. Automated code review tools may help identify these patterns.

Sources

SourceLink
github.comgithub.com/Budibase/budibase/commit/5f37fb43728639c540cc7233283f1100e9315424
github.comgithub.com/Budibase/budibase/releases/tag/v3.50.0
github.comgithub.com/Budibase/budibase/releases/tag/v4.0.0
github.comgithub.com/Budibase/budibase/security/advisories/GHSA-r2q3-7m4h-63qg

Frequently asked

questions

A BASIC application user may be able to write to the shared datasource, and an unauthenticated visitor may be able to do so through a public write form, depending on the application's configuration.

No. The risk arises when a builder or administrator later previews the value; script execution then occurs in that higher-privileged user's browser session.

Render untrusted values as text using context-appropriate output encoding, and avoid raw HTML or safe-string handling for values that have not been safely sanitized.

Treat shared and externally sourced content as untrusted, review every rendering path for safe output handling, apply a restrictive Content-Security-Policy as defense in depth, and limit user privileges.

Find out what's already
exploitable in your codebase.