Name Embedding NULL Bytes
Summary An attacker 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).
Prerequisites The program does not properly handle postfix NULL terminators
Solutions Properly handle the NULL characters supplied as part of user input prior to doing anything with the data.
Related Weaknesses
CWE ID Description
CWE-20 Improper Input Validation
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
CWE-158 Improper Neutralization of Null Byte or NUL Character
CWE-171
CWE-172 Encoding Error
CWE-173 Improper Handling of Alternate Encoding
CWE-697 Insufficient Comparison
CWE-707 Improper Enforcement of Message or Data Structure
Back to Top