https://github.com/zeta-chain/go-tss
A critical vulnerability has been identified in ZetaChain, an EVM-compatible L1 blockchain that connects various ecosystems, originating from its reliance on the Cosmos SDK. This issue enables unsafe transaction decoding, which can lead to stack overflow (ASA-2024-0012) or resource exhaustion (ASA-2024-0013). Exploiting this flaw could disrupt ZetaChain’s node software, impacting network consensus, internal transactions, cross-chain functionality, and staking operations.
Description: ZetaChain’s usage of Cosmos SDK inherits a vulnerability where deeply nested packets during decoding can trigger a stack overflow. Without enforced recursion depth limits, attackers can craft malicious payloads that exploit this flaw, causing node crashes and denial of service.
Code Location: Vulnerability resides in the packet decoding mechanism:
err := codec.UnmarshalJSON(data, &someStruct)
if err != nil {
return err
}
Excessive nesting in payloads causes stack overflow due to unbounded recursion.
Description: Nested messages in transactions processed by ZetaChain’s Cosmos SDK dependency can cause exponential CPU and memory usage. Malicious actors could exploit this by submitting deeply nested transactions, overwhelming the system.
Code Location: Unpacking interfaces without validation creates resource exhaustion risks:
err := someStruct.UnpackInterfaces(unpacker)
if err != nil {
return err
}
Given the reliance of ZetaChain’s infrastructure on Cosmos SDK, this vulnerability is likely exploitable in its current implementation. The absence of depth and resource validation mechanisms increases the risk of exploitation.
https://dailycve.com/cosmos-sdk-transaction-decoding-vulnerabilities-asa-2024-0012-asa-2024-0013-high-severity/ https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-8wcc-m6j2-qxvm
A crafted transaction payload with excessive nested data can be submitted via the following steps:
v0.47.15
or v0.50.11
, which address these vulnerabilities by adding recursion depth limits and enhanced resource validation.https://dailycve.com/cosmos-sdk-transaction-decoding-vulnerabilities-asa-2024-0012-asa-2024-0013-high-severity/ https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-8wcc-m6j2-qxvm
A crafted transaction payload with excessive nested data can be submitted via the following steps: