Skip to content
vetkitChecksChangelogDocumentation

vetkit.php.mass-assignment.laravel-unguarded-model

A Laravel model disables mass-assignment protection ($guarded = [] or Model::unguard()). Any attribute passed to create()/update()/fill() is then writable.

Last updated:

Suite: Security

php

A Laravel model disables mass-assignment protection ($guarded = [] or Model::unguard()). Any attribute passed to create()/update()/fill() is then writable.

Category: SECURITY · Engine rule severity: INFO

How to fix it

Declare $fillable with the attributes users may set, or only pass $request->validated() / safe() data.

References

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