Submitted by PwnedNoMore
The MatchOneToManyOrders does not check whether a given sell order is malicious, i.e., containing no NFT tokens but still requiring payment.
This may cause the sellers to maliciously profit.
For example, we have a buyOrder and a set of sell orders [sellOrder0, sellOrder1, sellOrder2]. Originally, they match well but with a legal price gas (which is common in the real world), i.e., MatchOneToManyOrders(buyOrder, [sellOrder0, sellOrder1, sellOrder2]) can be successfully processed.
However, If the hacker proposes another sellOrder3 which sells nothing but requests money/tokens. The MatchOneToManyOrders(buyOrder, [sellOrder0, sellOrder1, sellOrder2, sellOrder3]) will also succeed and the hacker does not need to send out any NFT token but grabs a considerable gain.
There are two possible attack scenarios.
MATCH_EXECUTOR can always gain profit by leveraging this vulnerability. That is, every time the executor proposes a MatchOneToManyOrders, it can add one more EMPTY order to gain the profit.
It is one kind of centralization issue. All the processes should happen in a trust-less environment.
Note that creating an order happens off-chain. That means, the hacker can send out a large amount of EMPTY orders without paying any gas fee.
Once the executor picks any of the malicious orders, the hacker can gain the profit without a loss of NFT tokens.
This vulnerability also affects matchOrders.
For full details, see original submission.
To mitigate the issue entirely, I would suggest banning any empty NFT transfers.
For example, numNfts must be bigger than zero here. Also make sure the ERC1155 transferring at least 1 item.
nneverlander (Infinity) acknowledged and commented:
HardlyDifficult (judge) decreased severity to Medium and commented:
