CWE-181
Incorrect Behavior Order: Validate Before Filter
Description
The product validates data before it has been filtered, which prevents the product from detecting data that becomes invalid after the filtering step.
Consequences
Access Control
—
Bypass Protection Mechanism
This prevents the product from detecting data that becomes invalid after the filtering step. An attacker can bypass the validation and launch attacks that expose weaknesses that would otherwise be prevented, such as injection.
Mitigations
Phase: Implementation, Architecture and Design
Inputs should be decoded and canonicalized to the application's current internal representation before being filtered.