Skip to content
vetkitChecksChangelogDocumentation

vetkit.js.mass-assignment.request-body

The whole request body is written into a database model. Clients can set any field they like, including privileged ones such as role, isAdmin, ownerId or balance (mass assignment).

Last updated:

Suite: Security

javascript, typescript

The whole request body is written into a database model. Clients can set any field they like, including privileged ones such as role, isAdmin, ownerId or balance (mass assignment).

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Pick the allowed fields explicitly (const { name, email } = req.body) or validate the body with a schema that strips unknown keys before creating or updating the record.

References

Source: packages/engine/rules/sast/javascript.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.