BaseIncomplete

CWE-179Incorrect Behavior Order: Early Validation

Category: other

Description

The product validates input before applying protection mechanisms that modify the input, which could allow an attacker to bypass the validation via dangerous inputs that only arise after the modification. Product needs to validate data at the proper time, after data has been canonicalized and cleansed. Early validation is susceptible to various manipulations that result in dangerous inputs that are produced by canonicalization and cleansing.

Common consequences· 1

  • Access Control / Integrity — Bypass Protection Mechanism, Execute Unauthorized Code or Commands
    An attacker could include dangerous input that bypasses validation protection mechanisms which can be used to launch various attacks including injection attacks, execute arbitrary code or cause other unintended behavior.

Potential mitigations· 1

  • [Implementation]Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

Related CAPEC attack patterns· 3

CAPEC-3CAPEC-43CAPEC-71

References

  1. https://cwe.mitre.org/data/definitions/179.html

Exploits (incoming)3

TypeTargetConfidenceTier
AttackPatternUsing Leading 'Ghost' Character Sequences to Bypass Input Filterscapec-3100%live
AttackPatternExploiting Multiple Input Interpretation Layerscapec-43100%live
AttackPatternUsing Unicode Encoding to Bypass Validation Logiccapec-71100%live

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Incorrect Behavior Order: Validate Before Canonicalize
CWE
Incorrect Behavior Order: Validate Before Filter
CWE
Improper Input Validation
CWE
Incorrect Behavior Order: Early Amplification
CWE
Improper Neutralization of Leading Special Elements
CWE
Insufficient Verification of Data Authenticity
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.