57437 sc medium front running in factory produce
Submitted on Oct 26th 2025 at 08:45:30 UTC by @grearlake for Audit Comp | Belong
Report ID: #57437
Report Type: Smart Contract
Report severity: Medium
Target: https://github.com/immunefi-team/audit-comp-belong/blob/main/contracts/v2/platform/Factory.sol
Impacts:
Griefing (e.g. no profit motive for an attacker, but damage to the users or the protocol)
Description
Brief / Intro
Due to the way the hashed salt is generated in the produce() function, it is possible to DoS users from creating an access token by front-running them.
Vulnerability Details
In produce() the hashed salt is created and checked as follows:
bytes32 hashedSalt = _metadataHash(accessTokenInfo.metadata.name, accessTokenInfo.metadata.symbol);
require(getNftInstanceInfo[hashedSalt].nftAddress == address(0), TokenAlreadyExists());The _metadataHash function depends only on name and symbol:
Because the unique key (hashed salt) is derived only from name and symbol, an attacker can front-run a legitimate user by creating an access token with the same name and symbol, blocking the original user from creating the token (DoS).
Impact Details
Denial of service: attackers can prevent others from creating access tokens by preemptively producing tokens with the same name and symbol. This is a griefing vector (no direct profit needed).
Proof of Concept
Update the test at test/v2/platform/factory.test.ts with the following case:
References
Vulnerable file: https://github.com/immunefi-team/audit-comp-belong/blob/main/contracts/v2/platform/Factory.sol?utm_source=immunefi#L230-#L292
Was this helpful?