Back to Intelligence

CVE-2026-137498: Budibase Prototype Pollution Can Empty MongoDB Query Filters — Detection and Remediation Guide

SA
Security Arsenal Team
November 27, 2026
10 min read

NVD has published CVE-2026-137498 at CVSS 10, network-exploitable and unauthenticated. The important defender nuance is that the vulnerable component described in the advisory is Budibase Server from 3.39.18 before 4.0.0, while the business impact lands on MongoDB-backed collections. A remote attacker can supply proto as a dynamic JSON key in public Budibase queries, causing prototype pollution that erases the MongoDB query filter. A filter that should constrain a query to one tenant, one user, or one document becomes {}. In MongoDB semantics, that is the difference between a scoped operation and a collection-wide operation.

That is why this is a critical incident even before any confirmed exploitation campaign is reported. A single request to the query execution endpoint can turn into read, update, or delete against every document in a collection. If your organization uses Budibase for internal apps, customer portals, admin panels, workflow automation, or CRUD interfaces in front of MongoDB, treat internet-reachable Budibase query endpoints as an emergency exposure until version and request-path controls are verified.

The provided NVD item does not state confirmed in-the-wild exploitation, CISA KEV inclusion, or a public weaponized PoC. Do not wait for those signals. CVSS 10, no authentication, network reachability, and a one-request exploitation model mean defenders should assume discovery is cheap and scanning will follow quickly.

Technical Analysis

Affected product and versions: Budibase Server from 3.39.18 before 4.0.0. The fixed boundary is Budibase Server 4.0.0. The advisory identifies MongoDB as the affected data layer because Budibase query filters for MongoDB-backed collections can be erased, but the vulnerable software pathway is the Budibase Server query execution flow. Defenders should not misclassify this as a MongoDB server binary bug and then only patch mongod while leaving the exposed Budibase endpoint untouched.

Root cause: prototype pollution through attacker-controlled dynamic JSON keys. When a public query accepts JSON input and merges or assigns keys into a server-side object without blocking prototype-inherited keys, an attacker can introduce proto into the object graph. In vulnerable Node.js-style object handling, that can mutate inherited properties or alter later object construction. In this specific case, the downstream security effect is much simpler and much worse than abstract prototype pollution: the MongoDB filter object is reduced to {}.

Attack chain from a defender perspective: the attacker finds a Budibase public query endpoint that executes MongoDB-backed queries, submits one request containing attacker-controlled JSON with proto as a dynamic key, the polluted server-side state causes the expected query filter to be lost, Budibase issues a MongoDB operation with an empty filter, and the database returns, modifies, or removes every document in the targeted collection. Read impact is collection-wide data exposure. Write impact is collection-wide tampering. Delete impact is collection-wide destruction.

Exploitation requirements are low: network access to the Budibase query execution endpoint, a public query reachable without authentication, a MongoDB-backed collection behind that query, and a request body or parameter path that is translated into dynamic keys. There is no requirement for stolen credentials, session tokens, database access, or prior foothold. If the endpoint is exposed through a reverse proxy, portal, low-code app, or embedded public form, the attack surface is external.

Exploitation status based only on the supplied item: NVD publication is confirmed; CVSS 10 is confirmed; network vector is confirmed; active exploitation, KEV listing, and public PoC are not stated in the provided summary. Operationally, rank this as assume-exploitable and patch/mitigate immediately, while continuing to monitor CISA KEV and Budibase release channels for updates.

Primary defensive kill chain points are: upgrade Budibase, block unauthenticated public query execution where possible, deny proto at the edge, alert on single requests that precede collection-wide MongoDB operations, enforce least-privilege MongoDB users, and verify backups before attackers can turn this into a destructive event.

Detection & Response

The useful telemetry here is not generic prototype pollution chatter. It is the convergence of three signals: an unauthenticated request to a Budibase query execution path, JSON or form input containing proto, and a MongoDB operation whose filter becomes empty. Access logs alone may not include request bodies, so enable short-term body capture at the WAF, reverse proxy, API gateway, or Budibase app logs for suspected endpoints. Keep retention and privacy constraints in mind, but do not rely on URL-only logs if the exploit marker lives in the JSON body.

YAML
---
title: Budibase Public Query Prototype Pollution Attempt
description: Detects HTTP requests to Budibase public query execution endpoints carrying JSON keys associated with prototype pollution and filter erasure tied to CVE-2026-137498.
author: Security Arsenal
date: 2026/01/01
status: experimental
references:
  - https://nvd.nist.gov/vuln/detail/CVE-2026-137498
logsource:
  category: webserver
  product: budibase
detection:
  selection_method:
    http_method:
      - POST
      - PUT
      - PATCH
  selection_endpoint:
    uri|contains:
      - '/api/'
      - '/queries/'
      - '/query/'
      - '/execute'
      - '/public'
  selection_marker:
    request_body|contains:
      - '__proto__'
      - 'constructor.prototype'
      - 'prototype'
  condition: selection_method and selection_endpoint and selection_marker
falsepositives:
  - Security scanner or regression test explicitly validating prototype-pollution defenses
level: critical
---
title: MongoDB Collection-Wide Operation With Empty Filter
description: Detects MongoDB audit or application telemetry where find, update, delete, aggregate, or bulk operations are recorded with an effectively empty filter after a Budibase query execution request.
author: Security Arsenal
date: 2026/01/01
status: experimental
references:
  - https://nvd.nist.gov/vuln/detail/CVE-2026-137498
logsource:
  category: application
  product: mongodb
detection:
  selection_operation:
    operation|contains:
      - find
      - update
      - delete
      - aggregate
      - bulkWrite
  selection_empty_filter:
    message|contains:
      - 'filter: {}'
      - 'filter:{}'
      - 'q: {}'
      - 'q:{}'
      - 'query: {}'
      - 'query:{}'
  condition: selection_operation and selection_empty_filter
falsepositives:
  - Administrative maintenance jobs intentionally scanning or deleting whole collections
  - Legitimate analytics aggregation with explicit collection scope
level: high
KQL — Microsoft Sentinel / Defender
let SuspiciousWindow = 15m;
let BudibaseRequests =
    union isfuzzy=true (CommonSecurityLog), (Syslog)
    | where TimeGenerated > ago(24h)
    | extend RequestText = strcat(coalesce(column_ifexists('RequestURL', ''), ''), ' ', coalesce(column_ifexists('Message', ''), ''), ' ', coalesce(column_ifexists('AdditionalExtensions', ''), ''), ' ', coalesce(column_ifexists('RequestPayload', ''), ''), ' ', coalesce(column_ifexists('Payload', ''), ''))
    | where RequestMethod in ('POST', 'PUT', 'PATCH') or ProcessName has_any ('node','budibase')
    | where RequestText has_any ('/api/', '/queries/', '/query/', '/execute', '/public')
    | where RequestText has '__proto__'
    | summarize FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated), RequestCount=count(), SampleRequests=make_set(RequestText, 10) by SourceIP, coalesce(column_ifexists('DestinationHostName', Computer), Computer), coalesce(column_ifexists('RequestURL', ''), '')
    | where RequestCount >= 1;
let MongoWideOps =
    union isfuzzy=true (Syslog), (CommonSecurityLog)
    | where TimeGenerated > ago(24h)
    | where Message has_any ('mongodb', 'mongo') or ProcessName has_any ('mongod', 'mongo')
    | where Message has_any ('find', 'update', 'delete', 'aggregate', 'bulkWrite')
    | where Message matches regex @'(filter|q|query)\s*[:=]\s*\{\s*\}'
    | summarize MongoOps=count(), SampleMongo=make_set(Message, 10) by Computer, ProcessName, bin(TimeGenerated, 5m);
BudibaseRequests
| join kind=leftouter (MongoWideOps) on $left.LastSeen between (datetime_add('minute', -15, $right.TimeGenerated) .. datetime_add('minute', 15, $right.TimeGenerated))
| project FirstSeen, LastSeen, SourceIP, DestinationHostName=column_ifexists('DestinationHostName', ''), RequestCount, MongoOps, SampleRequests, SampleMongo
| order by LastSeen desc
VQL — Velociraptor
-- Hunt Budibase and Node processes plus local web/app log artifacts that preserve __proto__ markers after CVE-2026-137498 triage.
LET suspicious_proc <= SELECT Pid, Name, Exe, CommandLine, Username, CreateTime FROM pslist() WHERE (Name =~ 'node|budibase' OR Exe =~ 'budibase|node') AND CommandLine =~ 'budibase|server|query|app'

SELECT Pid, Name, Exe, CommandLine, Username, CreateTime FROM suspicious_proc

SELECT Pid, Name, LocalIp, LocalPort, RemoteIp, RemotePort, State FROM netstat() WHERE State =~ 'LISTEN|ESTABLISHED' AND Pid in (SELECT Pid FROM suspicious_proc)

SELECT FullPath, Size, Mtime FROM glob(globs=['/var/log/nginx/*.log', '/var/log/apache2/*.log', '/var/log/caddy/*.log', '/opt/budibase*/logs/*.log', '/var/lib/docker/containers/*/*-json.log']) WHERE Mtime > now() - 86400
Bash / Shell
set -euo pipefail
# Run on the Budibase host or CI/CD build host. This script verifies exposure and prints the exact remediation path; review before executing any upgrade.

# 1) Identify installed Budibase version from common package, container, or compose locations.
if command -v jq >/dev/null 2>&1; then
  find /opt /srv /var/www /home -maxdepth 5 -name package.json 2>/dev/null | while read -r pkg; do
    ver=$(jq -r '.dependencies["@budibase/server"] // .dependencies["budibase"] // .version // empty' "$pkg" 2>/dev/null || true)
    [ -n "$ver" ] && printf 'PACKAGE %s VERSION %s\n' "$pkg" "$ver"
  done
fi

if command -v docker >/dev/null 2>&1; then
  docker ps --format '{{.Names}} {{.Image}}' | grep -i budibase || true
  docker images --format '{{.Repository}}:{{.Tag}}' | grep -i budibase || true
fi

grep -RniE 'budibase|BUDIBASE|image:.*budibase' /opt /srv /etc/docker /home 2>/dev/null | head -200 || true

# 2) Flag the vulnerable range: 3.39.18 inclusive up to but not including 4.0.0.
python3 - <<'PY'
import re,sys
text=sys.stdin.read()
PY
printf 'VULNERABLE RANGE: Budibase Server >=3.39.18 and <4.0.0. FIXED BOUNDARY: 4.0.0 or later.\n'

# 3) Immediate edge mitigation while patching: block prototype-pollution keys on Budibase query execution routes.
printf '%s\n' 'Add at WAF/reverse proxy/API gateway now:'
printf '%s\n' ' - Require authentication for query execution endpoints unless a public query is explicitly required.'
printf '%s\n' ' - Deny POST/PUT/PATCH bodies containing __proto__, constructor.prototype, or prototype keys before Budibase.'
printf '%s\n' ' - Rate-limit and alert on single requests to /api/, /queries/, /query/, /execute, /public paths.'

# 4) MongoDB blast-radius reduction and evidence preservation.
printf '%s\n' 'MongoDB hardening:'
printf '%s\n' ' - Confirm mongod/mongos is not internet-reachable and only reachable from Budibase service IPs.'
printf '%s\n' ' - Rotate credentials used by Budibase; enforce least privilege per collection and remove broad dbAdmin/root rights.'
printf '%s\n' ' - Enable MongoDB audit logging for authz checks and CRUD operations; preserve logs before upgrade.'
printf '%s\n' ' - Verify restore-tested backups and snapshot collections before destructive-update risk windows.'

Remediation

Upgrade Budibase Server to 4.0.0 or later. Inventory every Budibase deployment, including embedded containers, sidecar services, test instances exposed through VPNs, and low-code apps forgotten in cloud subscriptions. Confirm whether any instance is 3.39.18 or later but below 4.0.0; those are in the explicitly vulnerable range. Treat older 3.x instances as suspect until Budibase release notes prove otherwise, but do not let uncertainty delay edge controls.

Patch is the primary fix. Until deployment completes, put compensating controls in front of the query execution endpoint. Require authentication for query execution where a public query is not absolutely necessary. If public queries are required, restrict them by route, source IP where feasible, request schema, size, and rate. Deny request bodies containing proto, constructor.prototype, and prototype keys at the WAF, reverse proxy, or API gateway before they reach Budibase. Validate that your edge device actually inspects JSON bodies and nested keys, not just raw string matches.

Reduce MongoDB blast radius immediately. Confirm MongoDB is not directly exposed to clients or the internet. Put Budibase and MongoDB on separate trust boundaries, allow only Budibase service identity to reach MongoDB, and scope the Budibase database user to the minimum collections and actions required. Remove broad update/delete rights for read-only app paths. Separate tenant data where feasible so one erased filter cannot become an all-tenant event.

Enable and preserve evidence before cleanup. Capture Budibase application logs, reverse proxy access and body logs, WAF events, and MongoDB audit logs for the suspected window. Look for one suspicious request followed by collection-wide reads or writes, sudden response-size inflation, mass export behavior, bulk update/delete audit records, and query shapes collapsing to {}. If you find impact, isolate the Budibase service, rotate application and database credentials, preserve the database state, and restore from verified backups only after confirming attackers cannot replay the same request.

Monitor official sources continuously: the NVD entry at https://nvd.nist.gov/vuln/detail/CVE-2026-137498, Budibase release notes and security advisories at https://github.com/Budibase/budibase/releases, Budibase documentation at https://docs.budibase.com/, and CISA KEV at https://www.cisa.gov/known-exploited-vulnerabilities-catalog. No KEV deadline was included in the supplied item; if CISA adds CVE-2026-137498 to KEV, federal and aligned organizations should treat the KEV due date as binding and everyone else should treat it as confirmation that exploitation moved from plausible to observed.

Related Resources

Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.