# The Attacks to Expect: Injection and Mass Assignment

The first things attackers try against an API are a MongoDB operator where text belongs, a body that sets fields it shouldn't, and errors that give details away, so an API checks that fields are text, copies only an allow-list of fields, answers errors in plain words and runs npm audit.

![Cheat sheet: The Attacks to Expect: Injection and Mass Assignment](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/d9c14f5c9c974323b7cb7a1dd5e5e642.webp)

- Category: Node.js
- Level: Journeyman
- Tags: Allow-List, Mass Assignment, nodejs, NoSQL Injection, npm audit, Query Operators, web-development
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/node-security-common-attacks-cheat-sheet
