428
Strategy = Input Validation
Inputs should be decoded and canonicalized to the application's current internal representation
before being validated (CWE-180). Make sure that the application does not decode the same
input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by
introducing dangerous inputs after they have been checked.
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 992 SFP Secondary Cluster: Faulty Input Transformation 888 2416
MemberOf 1407 Comprehensive Categorization: Improper Neutralization 1400 2532
Taxonomy Mappings
Mapped Taxonomy Name Node ID Fit Mapped Node Name
PLOVER Inconsistent Special Elements
CWE-170: Improper Null Termination
Weakness ID : 170
Structure : Simple
Abstraction : Base
Description
The product does not terminate or incorrectly terminates a string or array with a null character or
equivalent terminator.
Extended Description
Null termination errors frequently occur in two different ways. An off-by-one error could cause a null
to be written out of bounds, leading to an overflow. Or, a program could use a strncpy() function call
incorrectly, which prevents a null terminator from being added at all. Other scenarios are possible.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 707 Improper Neutralization 1546
PeerOf 463 Deletion of Data Structure Sentinel 1105
PeerOf 464 Addition of Data Structure Sentinel 1107
CanAlsoBe 147 Improper Neutralization of Input Terminators 389
CanFollow 193 Off-by-one Error 486
CanFollow 682 Incorrect Calculation 1499
CanPrecede 120 Buffer Copy without Checking Size of Input ('Classic Buffer
Overflow')