SCWE-044: Insecure Use of Storage
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-20: Improper Input Validation
CWE-20 Link
Description¶
Insecure use of storage refers to vulnerabilities that arise when storage variables are improperly managed. This can lead to: - Unauthorized access to sensitive data. - Loss of funds or data. - Exploitation of vulnerabilities in contract logic.
Remediation¶
- Encrypt sensitive data: Encrypt sensitive data before storing it.
- Validate inputs: Ensure all storage updates are properly validated.
- Test thoroughly: Conduct extensive testing to ensure storage is secure.
Examples¶
-
Insecure Storage Usage
-
Secure Storage Usage