{"id":"CVE-2026-1849","summary":"Mongod can run out of stack memory when expressions create deeply nested documents","details":"MongoDB Server may experience an out-of-memory failure while evaluating expressions that produce deeply nested documents. The issue arises in recursive functions because the server does not periodically check the depth of the expression.","aliases":["BIT-mongodb-2026-1849"],"modified":"2026-08-12T15:31:29.812611Z","published":"2026-02-10T18:52:52.737Z","database_specific":{"cna_assigner":"mongodb","cwe_ids":["CWE-674"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/1xxx/CVE-2026-1849.json","unresolved_ranges":[{"extracted_events":[{"introduced":"8.0"},{"fixed":"8.0.18"},{"introduced":"7.0"},{"fixed":"7.0.29"},{"introduced":"8.2"},{"fixed":"8.2.2"}],"source":"AFFECTED_FIELD"}]},"references":[{"type":"WEB","url":"https://jira.mongodb.org/browse/SERVER-102364"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/1xxx/CVE-2026-1849.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-1849"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/mongodb/mongo","events":[{"introduced":"37d84072b5c5b9fd723db5fa133fb202ad2317f1"},{"fixed":"b409fb494004bf0f7284059b806b3b751a2ec5d9"},{"introduced":"b41cda4fe697dce6fd9b83b3805362ccc02fbeb3"},{"fixed":"af851bae82a9fc9d93657f9707a845990460898e"},{"introduced":"b993867dce63dd366cd93e60f3f425ed716f6497"},{"fixed":"d4511d28ec0c73f0c476027a943c0176c8a16f02"}],"database_specific":{"cpe":"cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"7.0.0"},{"fixed":"7.0.29"},{"introduced":"8.0.0"},{"fixed":"8.0.18"},{"introduced":"8.2.0"},{"fixed":"8.2.2"}],"source":"CPE_RANGE"}}],"versions":["r7.0.28","r8.0.17","r8.0.17-alpha0","r8.0.16-rc1","r8.0.16","r7.0.27-alpha0","r7.0.26-rc0","r7.0.26","r8.0.16-rc0","r8.0.14-rc1","r8.0.14","r7.0.24-rc0","r7.0.24","r8.2.1-rc1","r8.2.1","r8.2.1-rc0","r7.0.25-alpha0","r8.0.14-rc0","r8.2.0","r8.0.13-rc2","r8.0.13","r8.0.13-rc1","r8.0.13-rc0","r7.0.23-rc1","r7.0.23","r7.0.23-rc0","r7.0.22-rc0","r7.0.22","r8.0.12-rc0","r8.0.12","r8.0.10-rc0","r8.0.10","r7.0.21-rc0","r7.0.21","r7.0.21-alpha0","r7.0.18","r8.0.6","r7.0.17","r8.0.5-rc2","r8.0.5","r8.0.5-rc1","r8.0.5-rc0","r7.0.16-rc1","r7.0.16-rc0","r7.0.16","r8.0.4-rc0","r8.0.4","r7.0.15","r8.0.3","r8.0.2","r7.0.15-rc1","r7.0.15-rc0","r8.0.1-rc0","r8.0.1","r8.0.0","r7.0.14-rc0","r7.0.14","r7.0.13-rc1","r7.0.13","r7.0.13-rc0","r7.0.12-rc1","r7.0.12","r7.0.12-rc0","r7.0.11-rc2","r7.0.11","r7.0.11-rc1","r7.0.11-rc0","r7.0.10-rc0","r7.0.10","r7.0.9-rc1","r7.0.9","r7.0.9-rc0","r7.0.8-rc0","r7.0.8","r7.0.7-rc2","r7.0.7","r7.0.7-rc1","r7.0.7-rc0","r7.0.6-rc0","r7.0.6","r7.0.5-rc0","r7.0.5","r7.0.4-rc0","r7.0.4","r7.0.3-rc1","r7.0.3","r7.0.3-rc0","r7.0.2-rc2","r7.0.2","r7.0.2-rc1","r7.0.2-rc0","r7.0.1-rc0","r7.0.1","r7.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-1849.json","vanir_signatures_modified":"2026-08-12T15:31:29Z","vanir_signatures":[{"deprecated":false,"digest":{"line_hashes":["11272611040114298527385613556453291829","175117650864466198429070599697755025763","259372737161260841017051100781998432651","190191220307360414594805946771026217001","29054105381567763046288516247318577171","80859590129831648960865656848228415255","259393610319526121774434945054847506142"],"threshold":0.9},"id":"CVE-2026-1849-b3f79aa4","signature_type":"Line","signature_version":"v1","source":"https://github.com/mongodb/mongo/commit/b409fb494004bf0f7284059b806b3b751a2ec5d9","target":{"file":"src/mongo/db/service_entry_point_common.cpp"}},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/mongodb/mongo/commit/b409fb494004bf0f7284059b806b3b751a2ec5d9","target":{"file":"src/mongo/db/service_entry_point_common.cpp","function":"ExecCommandDatabase::_initiateCommand"},"deprecated":false,"digest":{"function_hash":"59615453827642453525115701432201606392","length":9728},"id":"CVE-2026-1849-b50a3bee"}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"}]}