57724 sc medium universal signature for produce allows front running and collection hijack

Submitted on Oct 28th 2025 at 13:43:46 UTC by @auditagent for Audit Comp | Belongarrow-up-right

  • Report ID: #57724

  • Report Type: Smart Contract

  • Report severity: Medium

  • Target: https://github.com/immunefi-team/audit-comp-belong/blob/main/contracts/v2/platform/Factory.sol

  • Impacts:

    • Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield

    • Direct theft of any user NFTs, whether at-rest or in-motion, other than unclaimed royalties

Description

Brief / Intro

The produce() function in Factory.sol is vulnerable to front-running because the signature verification does not include the intended caller's address (msg.sender). An attacker observing a pending collection deployment in the mempool can extract the signed parameters and replay them to steal ownership of the collection and its royalty streams.

Vulnerability Details

In Factory.sol, the produce() function validates collection creation using SignatureVerifier.checkAccessTokenInfo():

function produce(AccessTokenInfo memory accessTokenInfo, bytes32 referralCode)
    external
    returns (address nftAddress)
{
    FactoryParameters memory factoryParameters = _nftFactoryParameters;

    factoryParameters.signerAddress.checkAccessTokenInfo(accessTokenInfo);
    ...
}

SignatureVerifier.checkAccessTokenInfo() verifies a signature over metadata fields but excludes the intended creator (msg.sender):

The signed payload includes name, symbol, contractURI, feeNumerator, and chainid, but NOT msg.sender or any caller-specific identifier.

Impact Details

  • Attacker can become the owner/creator of the collection.

  • The victim's transaction will later revert with TokenAlreadyExists() when they attempt to submit it.

References

  • https://github.com/immunefi-team/audit-comp-belong/blob/main/contracts/v2/platform/Factory.sol#L230

  • https://github.com/immunefi-team/audit-comp-belong/blob/main/contracts/v2/utils/SignatureVerifier.sol#L53

Proof of Concept

chevron-rightTest that demonstrates front-running and collection hijack (expand to view)hashtag

Command to run the test:

Test code to add in test/v2/platform/factory.test.ts:

Was this helpful?