/

CVE-2026-35218

Severity:

HIGH RISK

(8.7)

Stored XSS in Budibase Builder Command Palette

CVE-2026-35218

Analyzed

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Account Takeover via Stored Cross-Site Scripting

Severity:

HIGH RISK

(8.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's Builder Command Palette previously rendered entity names as raw HTML, allowing stored cross-site scripting (XSS) when malicious markup was saved in table, view, query, or automation names.

Any authenticated Builder user in the same workspace who opened the Command Palette could have arbitrary JavaScript executed in their browser, potentially exposing session cookies and leading to full account takeover.

Affected context

This vulnerability arises within the Budibase Builder interface, specifically in the Command Palette (Ctrl+K) used to search and navigate between entities such as tables, views, queries, and automations.

It becomes relevant when:

  • Users have Builder-role access to a workspace
  • Entity names entered by users are later displayed to other Builder users
  • The UI renders these names using mechanisms (like Svelte's {@html}) that insert HTML directly into the DOM without sanitization

In such setups, user-controlled labels become an injection point for executable scripts in other users' browsers.

Exploit preconditions

  • Attack surface: Web-based Budibase Builder UI, specifically the Command Palette.
  • Required access: Authenticated account with Builder privileges in the target workspace, sufficient to create or rename entities (tables, views, queries, automations).
  • Victim profile: Other Builder-role users in the same workspace who use the Command Palette.
  • Trigger point: A victim opens the Command Palette (e.g., via Ctrl+K) after a malicious entity name has been created or renamed.
  • Why exploitation is possible: Entity names are treated as trusted HTML and rendered with Svelte's {@html} directive without escaping or sanitization, allowing attacker-controlled JavaScript to run in the context of the Budibase application.

Why this happens

The core issue is improper neutralization of user-controlled output before rendering it into the browser DOM.

In this case, Budibase's Command Palette used Svelte's {@html} directive to inject entity names directly as HTML, bypassing automatic escaping.

Because these names came from workspace users and were not sanitized or encoded, an attacker could store HTML/JavaScript payloads that would later be interpreted by the browser.

This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting), where untrusted data is embedded into a web page without robust output encoding at the sink.

Potential impact

  • Theft of session cookies or tokens from Builder users, which may enable full account takeover.
  • Execution of arbitrary JavaScript in the victim's browser with their Budibase privileges.
  • Unauthorized changes to application settings, data models, automations, or workspace configuration.
  • Creation of additional backdoor entities or automations to preserve access.
  • Lateral movement within the platform by impersonating higher-privileged Builder accounts.
  • Delivery of further social-engineering payloads via in-app modifications (e.g., malicious UI changes or prompts).

General mitigation guidance

Effective mitigation centers on treating all user-controlled labels and names as untrusted and ensuring they cannot introduce executable content into the DOM:

  • Prefer framework-provided, auto-escaped binding mechanisms for rendering dynamic text, avoiding direct HTML insertion constructs like Svelte's {@html} when data can originate from users.
  • Where raw HTML rendering is truly needed, pass content through a robust HTML sanitizer that strips or neutralizes scriptable contexts, event handlers, and dangerous attributes.
  • Enforce strict output encoding at the display layer, encoding special characters (<, >, ", ', &, /) before injecting data into HTML, attributes, or JavaScript contexts.
  • Apply clear separation between data and markup: store entity names as plain text and avoid interpreting them as HTML.
  • Reduce session impact by adopting strong session management practices, such as httpOnly cookies and scoped tokens, limiting the value of any stolen credentials.
  • Implement least-privilege role definitions so that compromise of one Builder account does not automatically expose all administrative capabilities.

How teams detect issues like this

High-level strategies to detect similar vulnerabilities include:

  • Static analysis and linting: Configure rules to flag use of raw HTML injection APIs (e.g., Svelte {@html}, React dangerouslySetInnerHTML, direct innerHTML assignments) when the source data is user-controlled or not explicitly sanitized.
  • Code review checklists: During review of UI components, require reviewers to confirm that all user-supplied data is rendered via auto-escaped bindings and that any exceptions are justified and sanitized.
  • Security-focused tests: Add unit and integration tests that attempt to render typical XSS payloads in user-modifiable fields (names, labels, descriptions) and verify they appear as inert text rather than executing.
  • Content policy enforcement: Consider using a restrictive Content Security Policy (CSP) to make exploitation harder by disallowing inline scripts and limiting script sources where feasible.
  • Automated scanning: Employ dynamic application security testing (DAST) tools against authenticated areas of the application to probe for stored and reflected XSS across commonly user-editable fields.

Sources

SourceLink
github.comgithub.com/Budibase/budibase/commit/c9ccf0c19e5849f1bda96401aa33f97c99cd8cd6
github.comgithub.com/Budibase/budibase/pull/18243
github.comgithub.com/Budibase/budibase/releases/tag/3.32.5
github.comgithub.com/Budibase/budibase/security/advisories/GHSA-gp5x-2v54-v2q5

Frequently asked

questions

Yes, but only within the context of authenticated Builder users. An attacker must first obtain or create a Builder-level account in the target workspace, after which they can plant a malicious entity name that executes when another Builder user opens the Command Palette.

No. The attacker needs sufficient permissions to create or rename entities (tables, views, queries, automations) in a workspace. Full administrative privileges are not strictly required, although higher roles can increase the potential impact of a compromise.

The safest pattern is to avoid rendering user-controlled strings as raw HTML and instead use the framework's default, auto-escaped bindings. Where raw HTML rendering cannot be avoided, pass all data through a vetted HTML sanitization layer and apply strict output encoding tailored to the context (HTML body, attributes, URLs, JavaScript).

Adopt a consistent output-encoding strategy, enforce coding standards that forbid unsafe HTML injection primitives for user data, and integrate automated checks (static analysis, security linters, and test cases) into the development pipeline. Regular security reviews of UI components and defense-in-depth measures like CSP and hardened session handling further reduce the risk and impact of XSS flaws.

Find out what's already
exploitable in your codebase.