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, directinnerHTMLassignments) 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.

