SCWE-026: Insufficient Hash Verification
Stable Version v1.0
This content is in the version-(v1.0) and still under active development, so it is subject to change any time (e.g. structure, IDs, content, URLs, etc.).
Relationships¶
- CWE-347: Improper Verification of Cryptographic Signature
CWE-347 Link
Description¶
Insufficient hash verification refers to the failure to properly verify hashes, such as message hashes or transaction hashes. This can lead to: - Unauthorized actions by malicious actors. - Loss of funds or data. - Exploitation of the contract's logic.
Remediation¶
- Validate hashes: Ensure all hashes are properly verified before processing.
- Use secure libraries: Leverage well-audited libraries for hash verification.
- Test thoroughly: Conduct extensive testing to ensure hash verification works as intended.
Examples¶
-
Insufficient Hash Verification
-
Sufficient Hash Verification