CVE-2021-41135 Authz Module Non-Determinism
Attackers can halt blockchain consensus by exploiting non-deterministic time checks in the authz module, requiring an upgrade to fix.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-41135?
CVE-2021-41135 is a medium-severity denial of service vulnerability in cosmos-sdk, published on 20 Oct 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
The Cosmos-SDK is a framework for building blockchain applications in Golang. Affected versions of the SDK were vulnerable to a consensus halt due to non-deterministic behaviour in a ValidateBasic method in the x/authz module. The MsgGrant of the x/authz module contains a Grant field which includes a user-defined expiration time for when the authorization grant expires. In Grant.ValidateBasic(), that time is compared to the node’s local clock time. Any chain running an affected version of the SDK with the authz module enabled could be halted by anyone with the ability to send transactions on that chain. Recovery would require applying the patch and rolling back the latest block. Users are advised to update to version 0.44.2.
Weakness: CWE-754
Which versions are affected by CVE-2021-41135?
2 open source packages ship an affected version, including github.com/cosmos/cosmos-sdk. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/cosmos/cosmos-sdk Go | From 0.43.0 | 0.44.2 |
github.com/cosmos/cosmos-sdk Go | From 0.43.0 | 0.44.2 |
Products include Interchain Cosmos Sdk.
How do I fix CVE-2021-41135?
Upgrade github.com/cosmos/cosmos-sdk to 0.44.2 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2021-41135 being exploited?
There is no known exploitation of CVE-2021-41135 in the wild and no public exploit code.
Sources
Also known as GHSA-2p6r-37p9-89p2.