This vulnerability occurs when an application fails to correctly process URL-encoded (also known as percent-encoded or hex-encoded) input, either by double-decoding it, not decoding it at all, or inconsistently handling encoded characters across different security checks.
URL encoding (like %20 for a space) is a standard way to safely transmit special characters in web requests. The security flaw arises when an application's validation logic, filtering routines, and business logic treat the same encoded input differently. For example, a security filter might check the raw encoded string, while a later processing step decodes it, allowing malicious payloads to slip through undetected. This inconsistency creates a classic security bypass. An attacker can embed malicious code (like SQL commands or script tags) within encoded sequences that evade initial validation. To prevent this, developers must ensure all security controls—input validation, output encoding, and business logic—operate on the same canonical, decoded representation of the data, and apply decoding only once, at the very beginning of the request pipeline.
Impact: Unexpected State
Strategy: Input Validation
Strategy: Input Validation
Strategy: Input Validation