Last updated: March 11, 2025
SCWE-022: Message Replay Vulnerabilities
Stable Version v0.0.1
This content is in the version-(v0.0.1) and still under active development, so it is subject to change any time (e.g. structure, IDs, content, URLs, etc.).
Send Feedback
Relationships
- CWE-294: Authentication Bypass by Capture-replay
CWE-294 Link
Description
Message replay vulnerabilities occur when an attacker can reuse a valid message or transaction to perform unauthorized actions. This can lead to:
- Unauthorized access to sensitive functions.
- Loss of funds or data.
- Exploitation of the contract's logic.
- Use nonces: Include a unique nonce in each message to prevent reuse.
- Validate timestamps: Ensure messages are only valid for a limited time.
- Implement replay protection: Use established libraries or mechanisms to prevent replay attacks.
Examples