Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Improper Neutralization of Special Elements in Data Query Logic vulnerabilities in an interactive lesson.
Start learningUpgrade mongoose to version 6.13.12, 7.8.13, 8.24.7, 9.11.4 or higher.
mongoose is a Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.
Affected versions of this package are vulnerable to Improper Neutralization of Special Elements in Data Query Logic via Query#_castConditions() in lib/query.js, which checks Connection.options, the global options, and per-query options for the sanitizeFilter flag, but never checks Connection.config. When sanitizeFilter is set at the connection level via mongoose.connect() or createConnection(uri, { sanitizeFilter: true }), NativeConnection#createClient() moves the option from options into Connection.config and deletes it from options, so _castConditions() never finds it and the sanitization step is skipped entirely. An attacker can therefore pass a query selector object such as { $ne: null } as a filter value and bypass authentication or access controls that depend on the connection-level option.
Note: This is only exploitable when sanitizeFilter is configured at the connection level. Applications that set sanitizeFilter globally via mongoose.set('sanitizeFilter') or per-query via .sanitizeFilter() are not affected.