GHSA-7q74-g774-7x3g: Interchain Security The Signers Of ICS Messages Vulnerability
HIGHGHSA-7q74-g774-7x3g is a HIGH the signers of ics messages vulnerability (General Security Weakness) affecting Interchain Security libraries in the Go ecosystem. The issue involves the signers of ics messages do not need to match the provider address. Remediation is available by upgrading affected packages to version 5.2.0.
GHSA-7q74-g774-7x3g at a Glance
How to Fix GHSA-7q74-g774-7x3g
To remediate this vulnerability, upgrade all affected Interchain Security dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/cosmos/interchain-security/v5 to 5.2.0
Upgrade github.com/cosmos/interchain-security to Latest secure release
Upgrade github.com/cosmos/interchain-security/v2 to Latest secure release
Upgrade github.com/cosmos/interchain-security/v3 to Latest secure release
Upgrade github.com/cosmos/interchain-security/v4 to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/cosmos/interchain-security/v5
How to Check if You Are Affected
To determine whether your application is affected by GHSA-7q74-g774-7x3g, inspect your project dependencies for Interchain Security:
inspect dependencies for github.com/cosmos/interchain-security/v5
Analyze the terminal output to locate any version of Interchain Security in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Interchain Security, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-7q74-g774-7x3g Affected Interchain Security Versions
5 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/cosmos/interchain-security/v5
|
Go |
≥ 5.1.0
< 5.2.0
|
5.2.0
|
|
github.com/cosmos/interchain-security
|
Go |
|
|
|
github.com/cosmos/interchain-security/v2
|
Go |
|
|
|
github.com/cosmos/interchain-security/v3
|
Go |
|
|
|
github.com/cosmos/interchain-security/v4
|
Go |
|
|
References
Frequently Asked Questions
What is GHSA-7q74-g774-7x3g?
Which Interchain Security versions are affected?
What version fixes GHSA-7q74-g774-7x3g?
Is github.com/cosmos/interchain-security/v5 affected?
Is github.com/cosmos/interchain-security affected?
What CWE is associated with GHSA-7q74-g774-7x3g?
How can I check Go dependencies for GHSA-7q74-g774-7x3g?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7q74-g774-7x3g",
"modified" : "2024-09-06T21:41:48Z",
"published" : "2024-09-05T21:19:36Z",
"aliases" : [ ],
"summary" : "Interchain Security: The signers of ICS messages do not need to match the provider address ",
"details" : "### Context\n\nICS has the following four messages that enable validators on the provider chain to perform different actions:\n\n- `MsgOptIn` -- adds a validator to the consumer chain’s active set\n- `MsgOptOut` -- removes a validator from the consumer chain’s active set \n- `MsgAssignConsumerKey` -- changes the consensus key used for a validator’s operations on a consumer chain\n- `MsgSetConsumerCommissionRate` -- sets a validator’s consumer-specific commission rate\n\nNormally, only the respective validators are allowed to perform these actions. \n\n### Issue\n\nThe upgrade to SDK 0.50, introduced a [signer](https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations#signer) field to these messages. This field is used to authenticate the user sending the message to the system. However, there was no validation on the ICS side to check if the signer matches the provider address. \n\nAs a result, any user could opt-in, opt-out, change the commission rate, or change what public key a validator uses on a consumer chain. \n\nFor more context, check out the code:\n\n- proto files https://github.com/cosmos/interchain-security/blob/v5.1.1/proto/interchain_security/ccv/provider/v1/tx.proto#L52\n- message validation https://github.com/cosmos/interchain-security/blob/v5.1.1/x/ccv/provider/types/msg.go#L106\n- message handling https://github.com/cosmos/interchain-security/blob/v5.1.1/x/ccv/provider/keeper/msg_server.go#L52\n\n### Severity assessment\n\nThe severity assessment is based on [this framework](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md). \n\n**Potential impact:** Catastrophic \n\n- By changing consumer keys for 1/3+ of a consumer chain's validator set, any user could cause a consumer chain to halt. Given that the consumer is down, the provider will jail provider validators for consumer downtime, so this exploit would not have impacted the provider directly. Consumer chain halts would need to be addressed by a provider-side patch.\n- By changing consumer keys on a consumer node, double signing, and submitting evidence back to the provider, any user could tombstone any provider validator. This would cause the provider's active set to change. At scale, this exploit could be applied to all active provider validators and a well-funded attacker could then run their own nodes and take over consensus on the provider and on consumer chains.\n\n**Likelihood:** Rare\n\n- The bug was discovered internally. There is no evidence that any external party has identified this vulnerability. \n- The bug has been live for two weeks with no issues. \n- All four message types are ones that only validators use, and rarely use in daily operations.\n- In the Cosmos Hub’s recent history (May - Aug), there has been only one instance of any of these message types, which was performed in accordance with chain rules.\n- The catastrophic exploits (such as tombstoning the entire validator set of the provider) are also extremely complex. They involve several operations that are not well-understood by many people, and the entire exploit must occur quickly and at-scale to avoid other node operators responding defensively.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cosmos/interchain-security/v5"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.1.0"
}, {
"fixed" : "5.2.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cosmos/interchain-security"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cosmos/interchain-security/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cosmos/interchain-security/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cosmos/interchain-security/v4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cosmos/interchain-security/security/advisories/GHSA-7q74-g774-7x3g"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cosmos/interchain-security"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-09-05T21:19:36Z",
"nvd_published_at" : null
}
}