Description
The Factory contract's set_pool_wasm_hash function does not validate that the new hash is a valid WASM module. It accepts any 32-byte hash.
Current behavior
pub fn set_pool_wasm_hash(env: Env, new_hash: BytesN<32>) -> Result<(), FactoryError> {
// No validation on new_hash
}
Expected behavior
Consider:
- Uploading and validating the WASM before setting the hash
- Or documenting that callers must verify the hash separately
- Or storing the WASM bytes alongside the hash for verification
Why this matters
Setting an invalid hash would cause all future pool deployments to fail.
Labels
security, factory, hard
Description
The Factory contract's
set_pool_wasm_hashfunction does not validate that the new hash is a valid WASM module. It accepts any 32-byte hash.Current behavior
Expected behavior
Consider:
Why this matters
Setting an invalid hash would cause all future pool deployments to fail.
Labels
security, factory, hard