57279 sc medium signature replayability repeated use of signed access tokens allows duplicate mints high

Submitted on Oct 24th 2025 at 22:43:14 UTC by @blacksaviour for Audit Comp | Belongarrow-up-right

  • Report ID: #57279

  • Report Type: Smart Contract

  • Report severity: Medium

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

  • Impacts:

    • Unauthorized minting of NFTs

Description

The SignatureVerifier contract accepts the same signed payload and signature multiple times without any replay protection mechanism such as a nonce, unique identifier, or state tracking.

In the provided test, both testAccessTokenCheck and testVestingWalletCheck calls succeed twice using identical payloads and signatures. This demonstrates that the system does not distinguish between first-time and replayed submissions. As a result, any valid signature from an authorized signer can be reused indefinitely.

This vulnerability allows an attacker (or any user possessing a valid signed message) to repeatedly perform privileged actions—such as minting tokens, creating vesting wallets, or claiming access rights—beyond the intended one-time use. In real deployments, this can lead to duplicated mints, bypassing of business logic, and potential economic loss to the platform or creators.

The issue stems from missing nonce enforcement or message uniqueness within the signature verification logic.

https://gist.github.com/Blacksaviour/da9d689c535baf419ddbaa3b4d702550

Proof of Concept

Below are the relevant files from the proof-of-concept showing how the SignatureVerifier can be replayed. Each file is included as a titled code block.

Summary of the issue (concise)

  • The SignatureVerifier accepts identical payloads and signatures multiple times.

  • No nonce, unique ID, or consumed-signature tracking is enforced.

  • An attacker or any holder of a valid signature can replay it to repeat privileged actions (e.g., minting), causing duplicated mints or unauthorized creation of resources.

Suggested mitigations (not exhaustive)

  • Include a nonce or unique identifier within the signed payload and enforce single-use by recording consumed nonces.

  • Track message uniqueness server-side or on-chain (e.g., mapping of used message hashes to booleans).

  • Use EIP-712 structured data including nonces/timestamps with strict validation and consumption semantics.

  • If using ERC-1271 signers, ensure the contract using SignatureVerifier implements replay protection for issued signatures.

(Do not add other mitigation specifics beyond what's implied by the report; above are common approaches to address signature replayability.)

Was this helpful?