- What is CWE-170?
- The product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator.
- What CVEs are caused by CWE-170?
- 43 recorded CVEs are attributed to CWE-170, including CVE-2021-1418, CVE-2021-1417, CVE-2021-1411.
- Is CWE-170 part of the OWASP Top 10?
- CWE-170 maps to OWASP Top Ten 2004: Denial of Service (A9) in the OWASP security taxonomy.
- How do you prevent CWE-170?
- Use a language that is not susceptible to these issues. However, be careful of null byte interaction errors (CWE-626) with lower-level constructs that may be written in a language that is susceptible.
- How is CWE-170 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-170?
- Exploiting CWE-170 can lead to: Read Memory, Execute Unauthorized Code or Commands, DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory), Modify Memory.
- Is CWE-170 actively exploited?
- 43 recorded CVEs are caused by CWE-170; none are currently in CISA's KEV catalog of actively exploited flaws.