Allowlisting vs Denylisting

Back to Input Validation

Allowlisting (accept known-good) is more secure than denylisting (reject known-bad) because it is impossible to enumerate all malicious inputs. Denylists can be bypassed with encoding tricks and novel attack patterns. Always prefer allowlisting for input validation.

application-security input-validation allowlisting