Umbra Wiki weakness weakness/CWE-181
Back to wiki

CWE-181 — Incorrect Behavior Order: Validate Before Filter

provenance: imported · CWE: CWE-181

CWE-181: Incorrect Behavior Order: Validate Before Filter

MITRE CWE weakness

Kind Weakness
Abstraction Variant
Status Draft
Likelihood of exploit

Description

The product validates data before it has been filtered, which prevents the product from detecting data that becomes invalid after the filtering step.

This can be used by an attacker to bypass the validation and launch attacks that expose weaknesses that would otherwise be prevented, such as injection.

Common consequences

  • Access Control: Bypass Protection Mechanism

Mitigations

Implementation — Inputs should be decoded and canonicalized to the application's current internal representation before being filtered.

References

  • CWE page: https://cwe.mitre.org/data/definitions/181.html
  • CWE list: https://cwe.mitre.org/data/index.html