mongoose: Improper Neutralization of Special Elements in Data Query Logic
CVE-2026-125120 is a critical-severity improper neutralization of special elements in data query logic vulnerability in mongoose from Automattic, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected mongoose versions: < 6.13.11; >= 7.0.0, < 7.8.12; >= 8.0.0, < 8.24.3, and others listed below. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.57% chance of exploitation within 30 days, which is low compared with other CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Check which version of mongoose you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Automattic | mongoose | < 6.13.11; >= 7.0.0, < 7.8.12; >= 8.0.0, < 8.24.3; >= 9.0.0, < 9.9.2 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by CNA (github.com).
Official description
Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Prior to 6.13.11, 7.8.12, 8.24.3, and 9.9.2, Mongoose countDocuments() does not apply the configured sanitizeFilter query selector injection defense. An application that enables sanitizeFilter and passes attacker-controlled filter values to countDocuments() can therefore process query operator objects as operators rather than literal values, causing the count to include documents that should not match and potentially undermining authorization or application logic based on that count. This issue is fixed in versions 6.13.11, 7.8.12, 8.24.3, and 9.9.2.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Neutralization of Special Elements in Data Query Logic
The product generates a query intended to access or manipulate data in a data store such as a database, but it does not neutralize or incorrectly neutralizes special elements that can modify the intended logic of the query.
More Improper Neutralization of Special Elements in Data Query Logic vulnerabilities (CWE-943)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a
- github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557
- github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d
- github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710
- github.com/Automattic/mongoose/releases/tag/6.13.11
- github.com/Automattic/mongoose/releases/tag/7.8.12
- github.com/Automattic/mongoose/releases/tag/8.24.3
- github.com/Automattic/mongoose/releases/tag/9.9.2
Other vulnerabilities in mongoose
- 7.5 High severity
- 8.2 High severity
- 7.5 High severity
Recent Improper Neutralization of Special Elements in Data Query Logic vulnerabilities
- 7.5 High severity
- 7.6 High severity
- 9.8 Critical severity
- 8.7 High severity
- 7.5 High severity
- 7.6 High severity
Spotted an error? Tell us.