Improper Validation of Integrity Check Value

Draft Base
Structure: Simple
Description

This vulnerability occurs when software fails to properly check the integrity of data by validating its checksum or hash value. Without this verification, the application cannot reliably detect if information has been altered, corrupted, or tampered with during storage or transmission.

Extended Description

Ignoring checksum validation introduces a preventable security gap. Most protocols specify a standard algorithm for generating these integrity values. The developer's responsibility is to implement that same calculation and compare the result against the provided checksum—a straightforward process that acts as a critical first line of defense against data corruption and malicious manipulation. Failure to perform this match correctly can have severe consequences. Since the application trusts the data as authentic, it may process malicious instructions, load corrupted files, or make decisions based on falsified information. This simple oversight can escalate into system compromise, data loss, or unstable behavior, making proper checksum verification a fundamental requirement for secure data handling.

Common Consequences 3
Scope: IntegrityOther

Impact: Modify Application DataOther

Integrity checks usually use a secret key that helps authenticate the data origin. Skipping integrity checking generally opens up the possibility that new data from an invalid source can be injected.

Scope: IntegrityOther

Impact: Other

Data that is parsed and used may be corrupted.

Scope: Non-RepudiationOther

Impact: Hide ActivitiesOther

Without a checksum check, it is impossible to determine if any changes have been made to the data after it was sent.

Potential Mitigations 1
Phase: Implementation
Ensure that the checksums present in messages are properly checked in accordance with the protocol specification before they are parsed and used.
Demonstrative Examples 1
The following example demonstrates the weakness.

Code Example:

Bad
C
c

Code Example:

Bad
Java
java
References 1
The CLASP Application Security Process
Secure Software, Inc.
2005
ID: REF-18
Likelihood of Exploit

Medium

Applicable Platforms
Languages:
Not Language-Specific : Undetermined
Modes of Introduction
Architecture and Design
Implementation
Taxonomy Mapping
  • ISA/IEC 62443
  • CLASP