CWEweakness
CWE-179 Incorrect Behavior Order: Early Validation
- Abstraction
- Base
- Structure
- Simple
- Status
- Incomplete
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product validates input before applying protection mechanisms that modify the input.
Common consequences
• Access Control, Integrity: Bypass Protection Mechanism, Execute Unauthorized Code or Commands — An attacker could bypass the protection mechanism by including dangerous inputs that are only produced after the modification (such as canonicalization and cleansing). This can be used to launch various attacks including injection, executing arbitrary code, or causing other unintended behavior.
Potential mitigations
• [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.
Observed examples
• CVE-2002-0433: List files in web server using "*.ext"
• CVE-2003-0332: Product modifies the first two letters of a filename extension after performing a security check, which allows remote attackers to bypass authentication via a filename with a .ats extension instead of a .hts extension.
• CVE-2002-0802: Database consumes an extra character when processing a character that cannot be converted, which could remove an escape character from the query and make the application subject to SQL injection attacks.
• CVE-2000-0191: Overlaps "fakechild/../realchild"
• CVE-2004-2363: Product checks URI for "<" and other literal characters, but does it before hex decoding the URI, so "%3E" and other sequences are allowed.
• CVE-2002-0934: Directory traversal vulnerability allows remote attackers to read or modify arbitrary files via invalid characters between two . (dot) characters, which are filtered and result in a ".." sequence.
• CVE-2003-0282: Directory traversal vulnerability allows attackers to overwrite arbitrary files via invalid characters between two . (dot) characters, which are filtered and result in a ".." sequence.
Related
Attack pattern · CAPEC (3)
Observed example · CVE (7)
- CVE-2004-2363 Validate-Before-Canonicalize vulnerability in the checkURI function in functions.inc.php in PHPX 3.0 through 3.2.6 allows remote attackers… vulnerability
- CVE-2003-0282 Directory traversal vulnerability in UnZip 5.50 allows attackers to overwrite arbitrary files via invalid characters between two . vulnerability
- CVE-2003-0332 The ISAPI extension in BadBlue 1.7 through 2.2, and possibly earlier versions, modifies the first two letters of a filename extension after… vulnerability
- CVE-2002-0934 Directory traversal vulnerability in Jon Hedley AlienForm2 (typically installed as af.cgi or alienform.cgi) allows remote attackers to read… vulnerability
- CVE-2002-0802 The multibyte support in PostgreSQL 6.5.x with SQL_ASCII encoding consumes an extra character when processing a character that cannot be… vulnerability
- CVE-2002-0433 Pi3Web 2.0.0 allows remote attackers to view restricted files via an HTTP request containing a "*" (wildcard or asterisk) character. vulnerability
- CVE-2000-0191 Axis StorPoint CD allows remote attackers to access administrator URLs without authentication via a .. vulnerability
Child of · CWE (2)
Referenced by CAPEC · weakness (3)
Referenced by CVE · weakness (8)
- CVE-2026-90813 A vulnerability was detected in cosmicstack-labs mercury-agent up to 1.1.13. vulnerability
- CVE-2026-49414 The ELF image activator cleared per-process ASLR preference flags for setuid binaries after the code that computes the PIE base address,… vulnerability
- CVE-2026-3832 A flaw was found in gnutls. vulnerability
- CVE-2026-32305 Traefik is an HTTP reverse proxy and load balancer. vulnerability
- CVE-2026-25223 Fastify is a fast and low overhead web framework, for Node.js. vulnerability
- CVE-2025-4759 Versions of the package lockfile-lint-api before 5.9.2 are vulnerable to Incorrect Behavior Order: Early Validation via the resolved… vulnerability
- CVE-2024-41686 This vulnerability exists in SyroTech SY-GPON-1110-WDONT Router due to improper implementation of password policies. vulnerability
- CVE-2022-1271 An arbitrary file write vulnerability was found in GNU gzip's zgrep utility. vulnerability
Referenced by CWE · child of (2)
Referenced by CWE · has member (1)
- CWE-884 CWE Cross-section view