Loss of multisig funds through single malicious participant's deliberate deception
A malicious participant in a Monero multisig can deceive other signers into authorising a second transaction from a different input while secretly keeping the first signed transaction, then broadcast both to cause a double payment. This can lead to loss of funds from the multisig.
Originally disclosed on HackerOne
- Triaged in 3 hours
- Fixed in 4 months
- Disclosed after 7 months
Summary:
A single malicious participant of a multisig can trick other users into sending funds multiple times to a certain recipient. This cannot be distinguished from a legitimate user easily.
https://docs.getmonero.org/multisignature/#spending
Keep in mind that partially signed multisig transactions can fail to be signed by the next participants with the following error, see the docs.
Error: Multisig error: This signature was made with stale data: export fresh multisig data, which other participants must then use
Suppose that a group of participants in a multisig is trying to send funds to address X. They have two inputs A and B. They create a transaction with input A, paying X. They sign and sign, but the last signer is malicious. He signs and saves the transaction without broadcasting, but claims it fails. "Guys, we need to do it again." Then he creates a transaction with input B, paying X. The others sign and release that transaction B -> X. Then the malicious signer releases A -> X. Double payment. (The malicious participant is especially incentivized to do this if he controls X.)
This could be somewhat mitigated by allowing users to see the input in a tx, so that the other users won't sign B -> X, as they have already "locked in" A -> X by deliberate action external to the Monero software (whether by memorization as humans or programmatically). This is currently not enabled by any RPC or wallet command, so this is impossible to detect for a normal user.
If this is implemented, it still does not fix the problem, because there is no way to build a transaction while deliberately selecting inputs. If a legitimate user actually did fail the signing because of the stale data error, but during that time the multisig received new coins, the transfer algorithm might select different inputs, and the user would appear malicious. There is no way to use the same input as the first time, because the transfer command or any other RPC or wallet command doesn't let you select inputs. This does not stop the attacker of course, who can deliberately send coins to the multisig to affect how the transfer construction algorithm selects inputs, until it selects a different set of inputs.
As a disclaimer, I asked about this in the monero research lounge chat because I thought it was a solved problem. It turned out there is no way to address this yet.
If you are wondering, this issue does not exist in bitcoin, because in bitcoin, 1. you can see the inputs, 2. you can select the inputs, 3. signatures don't expire so "made with stale data" doesn't work as an excuse. None of these are currently the case with monero.
AI was not used in this report, for any step.
Releases Affected:
All
Steps To Reproduce:
- Using the CLI, create a multisig wallet. Use a local testing network.
- Try building a multisig transaction. Verify that even when no blocks are being produced, after waiting a few minutes, the error
Error: Multisig error: This signature was made with stale data: export fresh multisig data, which other participants must then useoccurs when trying to sign as stated in the docs. - Build a transaction.
- Sign with all multisig participants, but the last one keeps it and doesn't broadcast.
- Send a bunch of other outputs to the multisig wallet until you can use
transferto build a transaction with a different input than the previous one (it's not clear what criteria are needed). It should be able to be seen with https://github.com/monero-project/monero/pull/10281. - Sign and broadcast that one.
- Broadcast the first one.
Supporting Material/References:
Seeing inputs branch by jeffro256 was made after some discussion: https://github.com/monero-project/monero/pull/10281
Housekeeping
I read https://github.com/monero-project/meta/blob/master/VULNERABILITY_RESPONSE_PROCESS.md
The link to available xmr for bounties does not work.
My address
88AHxEzRjyq1Jd4BMah9jVGi8jUdtd9DRK5KtFFYQjA5HSCg9T8zJG1CJZLKrN1xytYSPy5jq7XtXRnVrxTdHHUS5hJpK2D
Impact
Loss of funds from the multisig due to multiple sends induced by the malicious participant when only one was intended.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the wallet does not display or allow selection of transaction inputs, and signatures can become stale, enabling a malicious signer to withhold a signed transaction and later broadcast it alongside a second transaction built from different inputs.
Impact
Loss of funds from the multisig due to multiple sends induced by the malicious participant when only one was intended.
What the attacker needed
Participation in a multisig wallet; one malicious signer among participants; ability to send extra outputs to the multisig
The fix
The report suggests allowing users to see and select transaction inputs, but notes this does not fully fix the problem; no fix is stated as implemented.
How it was found
- Create a multisig wallet using the CLI on a local testing network.
- Try building a multisig transaction and observe the stale data error when signing after a few minutes.
- Build a transaction.
- Sign with all participants, but the last one keeps it and does not broadcast.
- Send other outputs to the multisig until a transfer can be built with a different input.
- Sign and broadcast the second transaction, then broadcast the first one.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A multisig wallet requires several people to approve a payment before it is sent. In this report, one of those people pretends a payment failed, gets the others to approve a second payment from a different source of funds, and then releases both payments. The other users cannot easily notice because the wallet software does not show which funds are being used.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.