CSACyber Security AuditWebbandflow
Web application vulnerabilities Medium

Mass Assignment

A flaw where an application blindly binds user input to internal fields, letting attackers set ones they should not.

What it is

Mass assignment occurs when an application automatically maps incoming request data onto internal object fields without checking which fields should be user-editable. An attacker can then supply extra fields, such as a role or account-balance value, and have them accepted. The flaw is one of trusting the shape of incoming data too much.

Why it matters

It can let a user quietly grant themselves privileges or modify data they were never meant to control, often with no obvious signs.

How to fix it

Explicitly define which fields may be set from user input using an allowlist, and never bind sensitive internal fields directly from requests.

Related terms

References

← Back to the glossary