CVE-2023-35163
JSON

6.0medium

Vega's validators able to submit duplicate transactions

Severity
6.0medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.49% (higher than 43% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8rc9-vxjh-qjf2GO-2023-1865

Description

Vega is a decentralized trading platform that allows pseudo-anonymous trading of derivatives on a blockchain. Prior to version 0.71.6, a vulnerability exists that allows a malicious validator to trick the Vega network into re-processing past Ethereum events from Vega’s Ethereum bridge. For example, a deposit to the collateral bridge for 100USDT that credits a party’s general account on Vega, can be re-processed 50 times resulting in 5000USDT in that party’s general account. This is without depositing any more than the original 100USDT on the bridge. Despite this exploit requiring access to a validator's Vega key, a validator key can be obtained at the small cost of 3000VEGA, the amount needed to announce a new node onto the network. A patch is available in version 0.71.6. No known workarounds are available, however there are mitigations in place should this vulnerability be exploited. There are monitoring alerts for `mainnet1` in place to identify any issues of this nature including this vulnerability being exploited. The validators have the ability to stop the bridge thus stopping any withdrawals should this vulnerability be exploited.

Affected

Product or packageVersionsReported by
vegaprotocol vega< 0.71.6CVE List
vega-functions_project vega-functionsbefore 0.71.6CVE List
code.vegaprotocol.io/vega (Go)before 0.71.6GitHub Advisory Database, Go Vulnerability Database
gobalsky vegabefore 0.71.6NVD

All scores

GitHub_M6.0medium CVSS:3.1CVSS:3.1/AV:P/AC:H/PR:H/UI:R/S:C/C:H/I:L/A:L
GitHub6.0medium CVSS:3.1CVSS:3.1/AV:P/AC:H/PR:H/UI:R/S:C/C:H/I:L/A:L
NVD5.2medium CVSS:3.1CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

Classification

CWE-20

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

Vega is a decentralized trading platform that allows pseudo-anonymous trading of derivatives on a blockchain. Prior to version 0.71.6, a vulnerability exists that allows a malicious validator to trick the Vega network into re-processing past Ethereum events from Vega’s Ethereum bridge. For example, a deposit to the collateral bridge for 100USDT that credits a party’s general account on Vega, can be re-processed 50 times resulting in 5000USDT in that party’s general account. This is without depositing any more than the original 100USDT on the bridge. Despite this exploit requiring access to a validator's Vega key, a validator key can be obtained at the small cost of 3000VEGA, the amount needed to announce a new node onto the network. A patch is available in version 0.71.6. No known workarounds are available, however there are mitigations in place should this vulnerability be exploited. There are monitoring alerts for `mainnet1` in place to identify any issues of this nature including this vulnerability being exploited. The validators have the ability to stop the bridge thus stopping any withdrawals should this vulnerability be exploited.

GitHub Advisory Database

A vulnerability exists that allows a malicious validator to trick the Vega network into re-processing past Ethereum events from Vega’s Ethereum bridge. For example, a deposit to the collateral bridge for 100USDT that credits a party’s general account on Vega, can be re-processed 50 times resulting in 5000USDT in that party’s general account. This is without depositing any more than the original 100USDT on the bridge.

Despite this exploit requiring access to a validator's Vega key, a validator key can be obtained at the small cost of 3000VEGA, the amount needed to announce a new node onto the network.

The steps to carry out this exploit are as follows:

  1. Cause an Ethereum event on one of the bridge contracts e.g a deposit to the collateral bridge, or the staking bridge
  2. This will result in the Ethereum-event-forwarder of each node to submit a ChainEvent transaction to the Vega network corresponding to that event
  3. Scrape the valid chain event transaction from the Tendermint block data using a node’s Tendermint API
  4. Change the value of the txId field of the ChainEvent to any valid, but different, value
  5. Bundle the tweaked ChainEvent into a new transaction, sign it with a validator key and resubmit to the Vega network
  6. The fraudulent ChainEvent will be processed by Vega as if it were a new ChainEvent even though it did not occur on Ethereum

The key to this exploit is in step 4. The txId field of the ChainEvent is used when checking for ChainEvent resubmission, but NOT during the subsequent on-chain verification of the event. Therefore changing the txId of an existing ChainEvent is enough to by-pass the duplication check and for it to still be verified as a real event.

Impact

The impact of this exploit is dependent on the ChainEvent being manipulated. The below table describes each one:

Chain EventAllowsConsequence
DepositGeneration of unlimited funds of any assetWithdrawal of all assets
Stake DepositDelegate unlimited Vega to a single nodeA single node has controlling amount of voting power
Stake RemovedForce a Validator node to drop below self-stake requirementsPrevents reward payouts
Bridge StopThe Vega network to think the bridge is stoppedPrevent anyone from withdrawing funds
Signer RemovedThe Vega network to think a validator nodes is not on the multisig contractPrevent reward payouts
Patches

v0.71.6

Workarounds

No work around known, however there are mitigations in place should this vulnerability be exploited:

  • there are monitoring alerts, for mainnet1, in place to identify any issues of this nature including this vulnerability being exploited
  • the validators have the ability to stop the bridge thus stopping any withdrawals should this vulnerability be exploited
References

N/A

Go Vulnerability Database

Vega's validators able to submit duplicate transactions in code.vegaprotocol.io/vega

References

Sources

SourceRecordLicence
CVE ListCVE-2023-35163 changed 2024-11-07CVE Terms of Use
GitHub Advisory DatabaseGHSA-8rc9-vxjh-qjf2 changed 2024-08-20CC-BY-4.0
Go Vulnerability DatabaseGO-2023-1865 changed 2026-03-03CC-BY-4.0
NVDCVE-2023-35163 changed 2026-06-17Public domain