Skip to content
vetkitChecksChangelogDocumentation

vetkit.py.nosql-injection.mongo-where

A MongoDB $where JavaScript expression is built with string interpolation. Injected values run as server-side JavaScript.

Last updated:

Suite: Security

python

A MongoDB $where JavaScript expression is built with string interpolation. Injected values run as server-side JavaScript.

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Replace $where with regular query operators ($eq, $in, $expr) and pass values as data.

References

Source: packages/engine/rules/sast/python.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.