- What is CWE-86?
- The product does not neutralize or incorrectly neutralizes invalid characters or byte sequences in the middle of tag names, URI schemes, and other identifiers.
- What CVEs are caused by CWE-86?
- 10 recorded CVEs are attributed to CWE-86, including CVE-2023-31126, CVE-2026-28417, CVE-2024-21864.
- How do you prevent CWE-86?
- Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.
- How is CWE-86 detected?
- Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
- What are the consequences of CWE-86?
- Exploiting CWE-86 can lead to: Read Application Data, Execute Unauthorized Code or Commands.
- Is CWE-86 actively exploited?
- 10 recorded CVEs are caused by CWE-86; none are currently in CISA's KEV catalog of actively exploited flaws.