Improper Handling of Missing Special Element

Draft Base
Structure: Simple
Description

This vulnerability occurs when software expects a specific delimiter, terminator, or other special marker in its input but fails to properly handle situations where that element is absent. The application may then misinterpret boundaries, leading to crashes, data corruption, or security breaches.

Extended Description

Think of this like a sentence missing its period. Without the expected terminator, the software doesn't know where the input ends. It might continue reading into adjacent memory or system buffers, treating regular data as commands. This often happens when parsing structured data like strings, headers, or protocol messages where a special character defines the end of a field. To prevent this, developers must write robust input validation that explicitly checks for the presence and correct placement of required special elements. Implement strict parsing logic with clear boundaries and use safe functions that limit read operations. Always define and handle error cases for malformed input, ensuring the system fails securely instead of proceeding with corrupted or dangerous assumptions.

Common Consequences 1
Scope: Availability

Impact: DoS: Crash, Exit, or Restart

Potential Mitigations 3
Developers should anticipate that special elements will be removed in the input vectors of their product. Use an appropriate combination of denylists and allowlists to ensure only valid, expected and appropriate input is processed by the system.
Phase: Implementation

Strategy: Input Validation

Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
Phase: Implementation

Strategy: Input Validation

Inputs should be decoded and canonicalized to the application's current internal representation before being validated (Incorrect Behavior Order: Validate Before Canonicalize). Make sure that the application does not decode the same input twice (Double Decoding of the Same Data). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
Observed Examples 3
CVE-2002-1362Crash via message type without separator character
CVE-2002-0729Missing special character (separator) causes crash
CVE-2002-1532HTTP GET without \r\n\r\n CRLF sequences causes product to wait indefinitely and prevents other users from accessing it
Applicable Platforms
Languages:
Not Language-Specific : Undetermined
Modes of Introduction
Implementation
Taxonomy Mapping
  • PLOVER