Skip to content
vetkitChecksChangelogDocumentation

vetkit.php.command-injection.mail-parameters

Request input reaches the additional_parameters argument of mail(), which is passed to the sendmail command line (argument injection; can write files or execute code).

Last updated:

Suite: Security

php

Request input reaches the additional_parameters argument of mail(), which is passed to the sendmail command line (argument injection; can write files or execute code).

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Do not pass user input as the fifth mail() argument; configure the envelope sender in php.ini or validate it strictly and wrap it with escapeshellarg().

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.