☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 5.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N 🐛 CWE-94
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-103965

CVE-2026-103965 Code Injection in MongoDB
📅 PUBLISHED: 2026-10-13 00:00 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🥷 MITRE: T1213
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: UNKNOWN
CVSS VECTOR BREAKDOWN 5.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: U Scope Unchanged
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
5.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-103965 is a logic vulnerability in the MongoDB Server aggregation framework that allows certain constant values to be mishandled during internal query rewriting. An authenticated user with read access can receive field values in aggregation output that the query did not intend to return. While the CVSS score of 5.4 indicates a moderate severity impact, the vulnerability affects data confidentiality and integrity assumptions for MongoDB deployments.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Technical Analysis

The vulnerability resides in the aggregation framework's internal query rewriting logic. During query optimization, MongoDB may rewrite aggregation pipelines to improve performance. CVE-2026-103965 causes certain constant values to be handled incorrectly during this rewriting process. The core flaw is classified as CWE-94 (Improper Control of Generation of Code, 'Code Injection'), which in this context likely refers to the improper handling of constant values that are incorporated into rewritten query structures.

The attack surface is the MongoDB aggregation framework, accessible through standard database query interfaces such as the aggregate command. An attacker must be authenticated and possess read access to the database. The vulnerability does not require user interaction and is network-accessible, as reflected in the CVSS vector (AV:N/AC:L/PR:L/UI:N). The impact is limited to confidentiality and integrity (C:L/I:L), with no direct impact on availability.

No specific version information, function names, or patch details are provided in the available intelligence. The exact conditions under which the incorrect handling occurs are not described beyond "certain constant values" and "certain conditions." Therefore, the analysis must remain at the vulnerability class level: a query rewriting defect that can cause unintended data exposure in aggregation results.

Exploitation Scenarios

  1. Reconnaissance/target identification: An attacker identifies a MongoDB Server instance accessible over the network (default port 27017) and obtains valid credentials with read access. This could be achieved through credential stuffing, default credentials, or prior compromise of a low-privileged account.

  2. Triggering the flaw: The attacker constructs an aggregation pipeline that includes constant values in a way that triggers the internal query rewriting logic. The specific structure required to trigger the mishandling is not publicly documented. Based on the vulnerability class, the attacker would likely use operators or expressions within the aggregation framework that cause the query optimizer to rewrite the pipeline, leading to incorrect handling of the constant values.

  3. Payload/execution method: The attacker executes the crafted aggregation query against the target database. The query is submitted through the standard MongoDB wire protocol or a database driver. The vulnerability is triggered during the server-side query rewriting phase.

  4. Post-exploitation impact: The attacker may receive field values in the aggregation output that the query was not intended to return. This could expose sensitive data that the attacker's read privileges were not supposed to grant access to, or it could return incorrect values that mislead the attacker. The impact is primarily information disclosure and potential data integrity issues in the query results. No public PoC is available; the attack chain is inferred from the vulnerability class.

Impact Assessment

The CVSS score of 5.4 (Medium) reflects a vulnerability that requires authentication (PR:L) and has limited confidentiality and integrity impact (C:L/I:L). There is no impact on availability (A:N). The attack vector is network-based (AV:N) with low attack complexity (AC:L) and no user interaction (UI:N). The scope is unchanged (S:U), meaning the vulnerable component and the impacted component are the same.

Business impact includes potential unauthorized access to data that should not be returned by a given aggregation query. In environments where MongoDB is used for multi-tenant applications or where read access is granted to users with restricted data visibility, this could lead to horizontal privilege escalation or data leakage. The blast radius is limited to the data accessible by the authenticated user, but the incorrect rewriting could bypass intended data filtering logic. Affected systems are MongoDB Server deployments that expose the aggregation framework to authenticated users. The lack of a patch increases the risk of exploitation, though no active exploitation has been observed.

Detection Guidance

Sigma Rule

title: MongoDB Aggregation Query Rewriting Anomaly
id: 8f4a2b1c-3d5e-4f6a-9b7c-1e2d3f4a5b6c
status: experimental
description: Detects aggregation queries that may trigger CVE-2026-103965 constant handling issue
author: valtersit.com
date: 2026-01-01
logsource:
  product: mongodb
  service: audit
detection:
  selection:
    type: "aggregate"
    param.pipeline|contains: "$const"
  condition: selection
falsepositives:
  - Legitimate use of constants in aggregation pipelines
level: low

YARA Rule

rule CVE_2026_103965_MongoDB_Aggregation_Rewrite
{
    meta:
        description = "Detects potential exploitation of CVE-2026-103965 in MongoDB aggregation queries"
        author = "valtersit.com"
        date = "2026-01-01"
        reference = "CVE-2026-103965"
        severity = "medium"
    strings:
        $agg = "aggregate"
        $const = "$const"
        $pipeline = "pipeline"
        $rewrite = "rewrite"
    condition:
        any of them
}

Suricata IDS Rule

alert tcp $EXTERNAL_NET any -> $HOME_NET 27017 (msg:"Possible CVE-2026-103965 MongoDB Aggregation Query Rewriting Exploit"; flow:to_server,established; content:"aggregate"; content:"$const"; distance:0; within:100; classtype:attempted-recon; sid:10000001; rev:1;)

Elastic Detection

process where event.type == "start" and process.name == "mongod" and
  process.args : "*aggregate*" and process.args : "*$const*"

Splunk SPL Query

index=mongodb_audit type=aggregate
| search pipeline="*$const*"
| stats count by user, client_ip, pipeline
| where count > 0

Wazuh OSSEC Rule

<group name="mongodb,">
  <rule id="100001" level="5">
    <decoded_as>json</decoded_as>
    <field name="type">aggregate</field>
    <field name="pipeline">\.*\$const\.*</field>
    <description>MongoDB aggregation query with constant may indicate CVE-2026-103965 exploitation attempt</description>
  </rule>
</group>

Mitigation & Patch Guidance

  1. Immediate mitigations:

    • Restrict network access to MongoDB instances to trusted networks only.
    • Enforce strong authentication and least-privilege read access.
    • Monitor audit logs for unusual aggregation queries, especially those involving constant values.
    • Consider disabling the aggregation framework for untrusted users if feasible, though this may break functionality.
  2. Patch/upgrade steps:

    • No patch is currently available (Patch confidence: 0/4). Monitor MongoDB security advisories for an official fix.
    • Once a patch is released, test and deploy it promptly.
  3. Long-term hardening:

    • Implement role-based access control (RBAC) with strict data filtering.
    • Regularly review user permissions and audit queries.
    • Use MongoDB's built-in auditing and integrate with SIEM for anomaly detection.
    • Keep MongoDB Server updated with the latest security patches.

References

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

product:"MongoDB"
title:"MongoDB"
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-103965/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.