CAPEC Definitions / CAPEC-52
CAPEC-52: Embedding NULL Bytes
An adversary embeds one or more null bytes in input to the target software. This attack relies on the usage of a null-valued byte as a string terminator in many environments. The goal is for certain components of the target software to stop processing the input when it encounters the null byte(s).
Extended Description
No Extended Description.
Mitigations
Properly handle the NULL characters supplied as part of user input prior to doing anything with the data.
Relationships with other CAPECs
CAPEC-267: Leverage Alternate Encoding
Prerequisites
The program does not properly handle postfix NULL terminators
Related Weaknesses
CWE-158: Improper Neutralization of Null Byte or NUL Character
CWE-172: Encoding Error
CWE-173: Improper Handling of Alternate Encoding
CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
CWE-20: Improper Input Validation
CWE-697: Incorrect Comparison
CWE-707: Improper Neutralization
