CVE-2026-40351: Typescript Nosql Injection Via Type Assertion On Request Body
A credential-like field (e.g., password, token, code) destructured from `req.body` via a TypeScript type assertion (`as <Type>`) is passed directly into a Mongoose equality query. TypeScript type assertions are erased at runtime and do not validate input, so an attacker can submit a JSON object such as `{"$ne": ""}` for a field expected to be a string/number
greprules fetch cve-2026-40351-typescript-nosql-injection-via-type-assertion-on-request-body --engine opengrepDescription
A credential-like field (e.g., password, token, code) destructured from `req.body` via a TypeScript type assertion (`as <Type>`) is passed directly into a Mongoose equality query. TypeScript type assertions are erased at runtime and do not validate input, so an attacker can submit a JSON object such as `{"$ne": ""}` for a field expected to be a string/number
Community feedback
0 rule-level signals from signed-in users.
- Useful reports
- 0
- Context false positives
- 0
- Metadata suggestions
- 0
Contextual precision
Aggregated from approved scan feedback. False-positive reports describe observed scan contexts, not a global rule verdict.
- Findings observed
- 0
- Projects
- 0
- Reporters
- 0
Precision details are collecting more signed-in reports before verdict counts or ratios are emphasized.
No approved finding verdicts yet.
No scan diagnostics reported yet.