Coordinated Vulnerability Disclosure
IMPORTANT: Do NOT open public issues for security vulnerabilities.Canonical Policies
The Cosmos SDK follows these security policies:-
Security Policy: Reporting process, scope, and disclosure standards
https://github.com/cosmos/security/blob/main/SECURITY.md -
Release & Maintenance Policy: Supported versions, lifecycle, and EOL
https://github.com/cosmos/security/blob/main/POLICY.md -
HackerOne Bug Bounty Program:
https://hackerone.com/cosmos
Reporting Vulnerabilities
Security vulnerabilities must be reported via: HackerOne: https://hackerone.com/cosmos Refer to the Security Policy for full reporting and disclosure details.Application Security
1. Input Validation
Always validate inputs in message handlers:2. Access Control
Implement proper authorization checks:3. Integer Overflow Protection
Use safe math operations:4. Reentrancy Protection
The SDK’s module-based architecture provides natural reentrancy protection, but be careful with external calls:5. Gas Limits
Prevent denial of service through gas exhaustion:AnteHandler Security
Sequence Validation
Properly validate transaction sequences to prevent replay attacks:Unordered Transaction Security
For unordered transactions, verify TTL and nonce:Keeper Security
1. Authority Validation
2. Module Account Protection
3. Store Access Control
Parameter Validation
Cryptographic Security
1. Signature Verification
2. Random Number Generation
Testing Security
1. Fuzzing
2. Invariant Checks
Common Vulnerabilities
1. Arithmetic Issues
- Integer overflow/underflow
- Division by zero
- Precision loss
sdkmath.Int and sdkmath.LegacyDec types
2. Access Control
- Missing authorization checks
- Incorrect authority validation
- Module account exposure
3. Input Validation
- Malformed addresses
- Invalid coin amounts
- Missing bounds checks
ValidateBasic and handlers
4. State Inconsistency
- Race conditions
- Invariant violations
- Incorrect state updates
5. Gas Exhaustion
- Unbounded loops
- Excessive storage operations
- Missing gas metering
Security Checklist
- All inputs validated in
ValidateBasicand handlers - Authority checked for privileged operations
- Safe math operations used (no overflow/underflow)
- Gas limits enforced for loops and batch operations
- Module accounts properly protected
- Invariants registered and tested
- Integration tests cover security scenarios
- Fuzz testing for input validation
- No hardcoded credentials or keys
- Proper error handling (no panics in msg handlers)
- Store access properly namespaced
- Parameters validated on update
Additional Resources
See Also
- Testing - Security testing strategies
- Modules - Secure module development
- AnteHandler - Transaction validation security