{"id":"CVE-2026-4148","summary":"ExpressionContext use-after-free in classic engine $lookup and $graphLookup aggregation operators","details":"A use-after-free vulnerability can be triggered in sharded clusters by an authenticated user with the read role who issues a specially crafted $lookup or $graphLookup aggregation pipeline.","aliases":["BIT-mongodb-2026-4148"],"modified":"2026-08-12T16:24:13.702762Z","published":"2026-03-17T15:53:57.874Z","database_specific":{"cna_assigner":"mongodb","cwe_ids":["CWE-416"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/4xxx/CVE-2026-4148.json","unresolved_ranges":[{"extracted_events":[{"introduced":"8.2"},{"fixed":"8.2.6"},{"introduced":"8.0"},{"fixed":"8.0.20"},{"introduced":"7.0"},{"fixed":"7.0.31"}],"source":"AFFECTED_FIELD"}]},"references":[{"type":"WEB","url":"https://jira.mongodb.org/browse/SERVER-119319"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/4xxx/CVE-2026-4148.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-4148"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/mongodb/mongo","events":[{"introduced":"37d84072b5c5b9fd723db5fa133fb202ad2317f1"},{"fixed":"ef9c90f7aba16cf5906f8665bb479f89c5aa4a2b"},{"introduced":"b41cda4fe697dce6fd9b83b3805362ccc02fbeb3"},{"fixed":"05009bb976757189fd9bff4cebc5d803a6737a95"},{"introduced":"b993867dce63dd366cd93e60f3f425ed716f6497"},{"fixed":"32a732a9b646200050bedd569d0e18fda534f92c"},{"introduced":"f363edefb03efa1e3e012d90aea1494c7770e8cc"},{"last_affected":"1bda66fa506b02978894c9a81f1821f3c0590507"}],"database_specific":{"cpe":["cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:*","cpe:2.3:a:mongodb:mongodb:8.3.0:alpha0:*:*:-:*:*:*","cpe:2.3:a:mongodb:mongodb:8.3.0:alpha1:*:*:-:*:*:*","cpe:2.3:a:mongodb:mongodb:8.3.0:alpha2:*:*:-:*:*:*","cpe:2.3:a:mongodb:mongodb:8.3.0:alpha3:*:*:-:*:*:*","cpe:2.3:a:mongodb:mongodb:8.3.0:rc1:*:*:-:*:*:*"],"extracted_events":[{"introduced":"7.0.0"},{"fixed":"7.0.31"},{"introduced":"8.0.0"},{"fixed":"8.0.20"},{"introduced":"8.2.0"},{"fixed":"8.2.6"},{"introduced":"8.3.0-alpha0"},{"last_affected":"8.3.0-alpha0"},{"introduced":"8.3.0-alpha1"},{"last_affected":"8.3.0-alpha1"},{"introduced":"8.3.0-alpha2"},{"last_affected":"8.3.0-alpha2"},{"introduced":"8.3.0-alpha3"},{"last_affected":"8.3.0-alpha3"},{"introduced":"8.3.0-rc1"},{"last_affected":"8.3.0-rc1"}],"source":["CPE_RANGE","CPE_STRING"]}}],"versions":["8.3.0-alpha0","8.3.0-alpha1","8.3.0-alpha2","8.3.0-alpha3","8.3.0-rc1","r8.3.0-rc1","r8.3.0-rc0","r8.3.0-alpha3","r8.3.0-alpha2","r8.3.0-alpha1","r8.2.4-alpha1","r8.2.4-alpha0","r7.0.27-rc0","r7.0.27","r8.0.17-alpha0","r8.0.16-rc1","r8.0.16","r7.0.27-alpha0","r7.0.26-rc0","r7.0.26","r8.2.3-alpha0","r8.2.2-rc0","r8.2.2","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","r8.3.0-alpha0","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-4148.json","vanir_signatures_modified":"2026-08-12T16:24:13Z","vanir_signatures":[{"digest":{"line_hashes":["212916051933611333336019566765871154533","127072531193682496647404363037825275968","82618083542634382065142722552922596523","4324924340243736427572372707787432252"],"threshold":0.9},"id":"CVE-2026-4148-074a18d5","signature_type":"Line","signature_version":"v1","source":"https://github.com/mongodb/mongo/commit/32a732a9b646200050bedd569d0e18fda534f92c","target":{"file":"src/mongo/util/md5.cpp"},"deprecated":false},{"digest":{"line_hashes":["243049191849363753065600341015684019120","312131738472726656287569917628189519640","269011836439409954144825691130893251414","261701652252642430706775392390697022443"],"threshold":0.9},"id":"CVE-2026-4148-1abd9456","signature_type":"Line","signature_version":"v1","source":"https://github.com/mongodb/mongo/commit/05009bb976757189fd9bff4cebc5d803a6737a95","target":{"file":"src/mongo/util/md5.cpp"},"deprecated":false},{"target":{"file":"src/mongo/util/md5.cpp","function":"md5_init"},"deprecated":false,"digest":{"function_hash":"22528191371751663195701634984920870034","length":244},"id":"CVE-2026-4148-3141a725","signature_type":"Function","signature_version":"v1","source":"https://github.com/mongodb/mongo/commit/05009bb976757189fd9bff4cebc5d803a6737a95"},{"signature_version":"v1","source":"https://github.com/mongodb/mongo/commit/32a732a9b646200050bedd569d0e18fda534f92c","target":{"file":"src/mongo/util/md5.cpp","function":"md5_init_state"},"deprecated":false,"digest":{"length":57,"function_hash":"253896680426164393151009864932457722232"},"id":"CVE-2026-4148-de078695","signature_type":"Function"}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}]}