Detect Budibase MongoDB Query Filter Erasure via Prototype Pollution (CVE-2026-137498) in Splunk
Detects exploitation attempts against CVE-2026-137498, a CVSS 9.9 prototype pollution vulnerability (CWE-943) in Budibase Server from 3.39.18 before 4.0.0. Unauthenticated attackers can inject prototype-polluting keys (e.g. __proto__, constructor, prototype) into datasource query payloads so that MongoDB query filter objects are erased, causing filter bypass and unauthorized data access. This detection looks for HTTP requests to Budibase datasource/query API endpoints whose bodies contain prototype-polluting keys combined with MongoDB operator syntax.
MITRE ATT&CK
SPL Detection Query
``` df00tech DF00-64b98becae · https://df00tech.com/detections/CVE-2026-137498 · licence: https://df00tech.com/detections/licence ```
index=web OR index=proxy (uri_path="*/api/queries*" OR uri_path="*/api/datasources*" OR uri_path="*/api/tables*")
| eval body=coalesce(form_data, http_body, request_body, uri_query)
| where match(body, "(?i)(__proto__|\"constructor\"|\"prototype\")")
| where match(body, "(?i)(\$where|\$ne|\$gt|\$regex|filter|mongodb)")
| stats count min(_time) as firstTime max(_time) as lastTime values(uri_path) as uris by src_ip, http_method
| convert ctime(firstTime) ctime(lastTime)
| where count > 0 Finds Budibase query/datasource API requests containing prototype-pollution keys with MongoDB operators, indicating CVE-2026-137498 exploitation.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Budibase builders authoring MongoDB queries referencing fields named constructor/prototype.
- Automated vulnerability scanners targeting the Budibase host.
- Normalized JSON bodies that embed reserved-word keys for legitimate schema reasons.
Other platforms for CVE-2026-137498
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 Prototype pollution via __proto__ in Budibase query body
Expected signal: Web/proxy log entry for POST /api/queries/preview with request body containing __proto__ and filter keys.
- Test 2 Constructor-based prototype pollution against datasource endpoint
Expected signal: HTTP POST to /api/datasources with body containing constructor and prototype keys.
- Test 3 Prototype pollution with MongoDB $where operator
Expected signal: Web server log entry for the POST request containing __proto__ and $where tokens.
Response Playbook
Triage
- Confirm the Budibase Server version is in the affected range (from 3.39.18 before 4.0.0) and that MongoDB datasources are configured.
- Inspect the captured request body for prototype-polluting keys (__proto__, constructor, prototype) and determine whether the request was unauthenticated.
- Correlate the source IP against known admin/builder users and expected automation; flag any external or anonymous origin.
- Review whether the targeted datasource query returned an abnormally large or unfiltered result set, indicating a successful filter erasure.
Containment
- Block the offending source IP(s) at the WAF/firewall and rate-limit the Budibase query API endpoints.
- Upgrade Budibase Server to 4.0.0 or later; if immediate upgrade is not possible, restrict network access to the Budibase instance to trusted IPs and place it behind an authenticated reverse proxy.
Evidence Collection
- Preserve raw web/proxy logs and full HTTP request bodies for the suspicious requests, including timestamps and source IPs.
- Export MongoDB server logs and Budibase application logs around the event window to assess which queries executed and what data was returned.
Escalation Criteria
- !Escalate to incident response if a prototype-pollution request returned sensitive records or if the application process shows signs of altered Object.prototype behavior.
- !Escalate if the source is external/unauthenticated and the Budibase instance exposes production datasources, indicating a probable data breach.
Investigation Guide
Forensic Artifacts
- >
Web/proxy access logs containing request bodies with prototype-polluting keys. - >
Budibase application logs recording datasource query execution and anomalous result volumes. - >
MongoDB query profiler/server logs showing queries executed with empty or altered filter objects.
Tuning Guidance
Baseline legitimate Budibase builder/admin IPs and exclude their datasource authoring traffic. If your Budibase deployment does not use MongoDB datasources, tighten the rule to alert on any prototype-polluting key in query bodies. Lower confidence if request bodies are not captured and only URI/query strings are available; raise severity disposition if the source IP is external and unauthenticated.
Hunting Queries
Surface all Budibase datasource/query requests referencing prototype-pollution keys regardless of MongoDB operator presence, to catch reconnaissance and variant payloads.
// df00tech DF00-64b98becae · https://df00tech.com/detections/CVE-2026-137498 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriStem has_any ("/api/queries","/api/datasources") | where csUriQuery has_any ("__proto__","constructor","prototype") | project TimeGenerated, cIP, csUriStem, csUriQuery ``` df00tech DF00-64b98becae · https://df00tech.com/detections/CVE-2026-137498 · licence: https://df00tech.com/detections/licence ```
index=web (uri_path="*/api/queries*" OR uri_path="*/api/datasources*") | search uri_query="*__proto__*" OR uri_query="*constructor*" OR uri_query="*prototype*" | table _time src_ip uri_path uri_query Atomic Red Team Tests
Sends an unauthenticated POST to the Budibase query endpoint with a __proto__ key designed to erase the MongoDB filter object.
Command
curl -s -X POST http://localhost:10000/api/queries/preview -H 'Content-Type: application/json' -d '{"fields":{"json":"{\"filter\":{},\"__proto__\":{\"filter\":null}}"},"datasourceId":"test"}' Cleanup
echo 'No persistent changes; restart Budibase/node process to clear polluted prototype if needed: docker restart budibase-apps' Expected Telemetry
Web/proxy log entry for POST /api/queries/preview with request body containing __proto__ and filter keys.
Expected Detection
KQL/SPL rules match on prototype-pollution key plus MongoDB filter operator in the request body.
Uses the constructor.prototype chain to inject a polluting property through the Budibase datasource API.
Command
curl -s -X POST http://localhost:10000/api/datasources -H 'Content-Type: application/json' -d '{"name":"t","config":{"constructor":{"prototype":{"filter":null}}},"source":"MONGODB"}' Cleanup
echo 'Delete the test datasource via the Budibase UI/API and restart the apps service: docker restart budibase-apps' Expected Telemetry
HTTP POST to /api/datasources with body containing constructor and prototype keys.
Expected Detection
Detection rules match on constructor/prototype keys combined with MongoDB source indicators.
Combines a prototype-pollution key with a MongoDB $where operator to demonstrate filter bypass in a query payload.
Command
powershell -Command "Invoke-RestMethod -Method Post -Uri 'http://localhost:10000/api/queries/preview' -ContentType 'application/json' -Body '{\"fields\":{\"json\":\"{\\\"__proto__\\\":{\\\"filter\\\":null},\\\"$where\\\":\\\"1==1\\\"}\"}}'" Cleanup
powershell -Command "Write-Output 'Restart Budibase service to clear any polluted prototype state'" Expected Telemetry
Web server log entry for the POST request containing __proto__ and $where tokens.
Expected Detection
All SIEM rules match on prototype-pollution key plus $where MongoDB operator.