Signature are malleable in SignatureVerifier.sol.
The contract verifies signatures using a library that does not reject malleable signatures, and the protocol adds no check of its own. An attacker could therefore alter an existing valid signature into a different valid form and potentially reuse it.
Belong
Originally disclosed on Immunefi
57911 sc medium signature are malleable in signatureverifier sol
- Report ID: #57911
- Report Type: Smart Contract
- Report severity: Medium
- Target: https://github.com/immunefi-team/audit-comp-belong/blob/main/contracts/v2/utils/SignatureVerifier.sol
- Submitted on: Oct 29th 2025 at 12:38:02 UTC by @Bx4 for Audit Comp | Belong
{% hint style="warning" %} Signature malleability is not prevented by the imported signature checking library. This may allow signature reuse or manipulation even if funds are not directly lost. {% endhint %}
Description
Brief / Intro
In SignatureVerifier.sol, the protocol does not implement checks to prevent signature malleability.
Vulnerability Details
SignatureVerifier.sol imports SignatureCheckerLib from Solady. That library uses its isValidSignatureNow implementation to verify signatures.
According to the Solady documentation, the imported library does not prevent malleability, and consumers must implement their own checks against malleability. The current implementation does not add such checks.
Malleability allows an existing signature to be manipulated and potentially reused.
Impact Details
Signature malleability can be abused by attackers for personal gains. The contract therefore fails to fully guarantee the integrity of verified signatures, even if no direct loss of funds occurs.
References
- https://github.com/belongnet/checkin-contracts/blob/22d92a3af433a1cf4d0aa758f872c887b2f33db8/contracts/v2/utils/SignatureVerifier.sol#L4
- https://github.com/belongnet/checkin-contracts/blob/22d92a3af433a1cf4d0aa758f872c887b2f33db8/contracts/v2/utils/SignatureVerifier.sol#L28
- Solady SignatureCheckerLib note: https://github.com/Vectorized/solady/blob/73f13dd1483707ef6b4d16cb0543570b7e1715a8/src/utils/SignatureCheckerLib.sol#L23
Proof of Concept
<details> <summary>View PoC</summary>/// WARNING! Do NOT use signatures as unique identifiers:
/// - Use a nonce in the digest to prevent replay attacks on the same contract.
/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.
/// EIP-712 also enables readable signing of typed data for better user safety.
> /// This implementation does NOT check if a signature is non-malleable.
library SignatureCheckerLib {
From the snippet above we can see that the library imported does not protect signatures against malleability and the current implementation does not add any prevention against malleability.
</details>Context
Belong runs a check-in contract system, and the target of this report is the signature verification utility used by that system: SignatureVerifier.sol, located at contracts/v2/utils/SignatureVerifier.sol in the belongnet/checkin-contracts repository. The contract imports Solady's SignatureCheckerLib and uses its isValidSignatureNow implementation to verify signatures. That decision is delegated to an imported library rather than implemented in the contract itself.
The report is a smart contract finding of medium severity, submitted on Oct 29th 2025 at 12:38:02 UTC by @Bx4 for the Belong audit competition. The core claim is narrow: the verification path does not reject malleable signatures, so a signature that has already been produced can be transformed into a different, still-valid signature.
Setup
No accounts, roles, tooling versions or deployment preconditions are described in the report. The analysis is a source-level review of the contract and of the library it imports. The relevant references given are:
SignatureVerifier.solline 4, the import of the signature checking library.SignatureVerifier.solline 28, the point in the contract where verification happens.- The Solady
SignatureCheckerLibsource, specifically the note at line 23 of that file.
Finding it
The researcher looked at how SignatureVerifier.sol verifies signatures. The contract imports SignatureCheckerLib from Solady and uses that library's isValidSignatureNow implementation to perform the check.
The Solady documentation states that the library does not prevent malleability and that consumers of the library must implement their own checks against it. The contract adds no such check. That mismatch between what the library guarantees and what the contract assumes is what made the code look wrong: The contract adds no malleability check of its own, although the library's documentation places that responsibility on the consumer.
Exploitation
The report does not walk through a live exploit against a deployed contract. It establishes the weakness from the library's own documentation, reproduced in the proof of concept.
Step 1: Read the library's warning
The proof of concept quotes the header comment of the imported library:
/// WARNING! Do NOT use signatures as unique identifiers:
/// - Use a nonce in the digest to prevent replay attacks on the same contract.
/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.
/// EIP-712 also enables readable signing of typed data for better user safety.
> /// This implementation does NOT check if a signature is non-malleable.
library SignatureCheckerLib {
The first lines warn against treating a signature as a unique identifier and recommend a nonce in the digest to stop replay on the same contract, plus EIP-712 to stop replay across chains and contracts. The final line, marked with >, is the one that matters here: the implementation does not check whether a signature is non-malleable.
Step 2: Confirm the contract adds nothing
The researcher then compared that warning with the contract. SignatureVerifier.sol imports the library and calls isValidSignatureNow, and it does not add any prevention against malleability on top. The gap is therefore inherited directly from the library, with no compensating control in the protocol code.
Step 3: Reason about the consequence
Because nothing rejects a modified form of an existing signature, an existing signature can be manipulated and potentially reused. The report does not provide a concrete transaction, payload or on-chain result demonstrating this; the argument rests on the documented behaviour of the library.
Root cause
The root cause is a delegation of trust to a library that explicitly disclaims part of the property the contract relies on. SignatureCheckerLib.isValidSignatureNow answers the question "is this a valid signature for this signer and digest?" but not "is this the only valid signature for this signer and digest?". The contract adds no prevention against malleability on top of the library.
Existing defences did not stop it because there were none at this layer: the library's own documentation places the responsibility for malleability checks on the consumer, and the consumer did not take it on.
Impact
Signature malleability can be abused by attackers for personal gain. The contract fails to fully guarantee the integrity of the signatures it verifies, even if no direct loss of funds occurs. The report is explicit that direct loss of funds is not established; the impact is the weakened integrity guarantee and the possibility of signature reuse or manipulation.
Fix
The report does not describe a fix that was applied. What it points to is the requirement stated by the library itself: consumers must implement their own checks against malleability. The report does not describe a fix; it notes the library requires consumers to implement their own malleability checks.
Variants to test
- Other Solady consumers. Search a codebase for imports of
SignatureCheckerLiband check whether each call site adds its own malleability handling. A positive result is a verification path that accepts a re-encoded form of a signature the signer produced. - Signatures used as identifiers. Look for signatures stored, compared or used as keys, for example to mark an action as done. A positive result is a second, differently encoded signature for the same message being accepted as a distinct action.
- Missing nonce in the digest. Check whether the signed digest includes a per-contract nonce. A positive result is the same signature being accepted twice for the same operation.
- Cross-chain and cross-contract replay. Check whether the digest is EIP-712 typed and domain-separated. A positive result is a signature valid on one deployment being accepted on another.
Hunting notes
This class of bug hides in thin wrapper contracts around well-known signature libraries: the wrapper looks like a safety layer, but it only forwards the call. The signal during review is an import of a signature checking library with no accompanying canonicalisation, nonce handling or uniqueness check at the call site, and a comment in the library source that explicitly disclaims malleability protection.
On impact, the report is candid about its limits: it argues weakened integrity and possible reuse rather than demonstrated fund loss, and it is rated medium severity.
What happened, in plain words
Belong runs a system of smart contracts for check-ins. A smart contract is a small program that lives on a blockchain, a shared public record that many computers keep copies of. One of those files, SignatureVerifier.sol, verifies signatures using an imported library.
A signature here is not a handwritten squiggle. It is a short piece of data produced by cryptography, a branch of mathematics used to prove things without revealing secrets. The person who owns a private key (a secret number) can produce a signature over a message; anyone with the matching public key can check it. Think of a wax seal on an envelope: the seal proves the letter came from the person holding the stamp, and anyone can look at the seal to check it.
The finding in this report is about a property called signature malleability. In everyday terms: some sealing methods let you take a sealed envelope, change the shape of the seal slightly without breaking it, and still have a seal that passes inspection. The letter inside is unchanged, the stamp is the same, but the seal now looks different. If a system treats the seal itself as a unique ticket number, that trick matters, because the same letter can now be presented twice with two different-looking seals.
The report says that SignatureVerifier.sol does not guard against this. It borrows its checking logic from a well-known library, a reusable bundle of code written by someone else, and that library's own documentation says it does not check for malleability. The contract adds no check of its own. So a signature that has already been produced can be transformed into a different signature that still verifies.
The report is rated medium severity. It does not demonstrate stolen funds. What it argues is that the contract cannot fully promise that a verified signature is the one and only signature for a given signer and message.
The target and the setup
The target is a single file in the belongnet/checkin-contracts repository:
contracts/v2/utils/SignatureVerifier.sol
A repository is a folder of code kept online, usually with a history of every change. The path above is just the address of the file inside that folder: contracts, then v2, then utils, then the file SignatureVerifier.sol. The .sol ending means it is written in Solidity, the main programming language for smart contracts on Ethereum-style blockchains.
The report is a smart contract finding submitted on Oct 29th 2025 at 12:38:02 UTC by @Bx4 for the Belong audit competition. An audit competition is an event where many independent researchers look at the same code and submit findings, and the best ones are rewarded.
There is no setup section in the report: no accounts, no roles, no tool versions, no deployed addresses. The whole analysis is a reading of the source code. That is normal for this kind of finding, because the weakness is visible in the text of the program itself.
The report points at three places to look:
- Line 4 of
SignatureVerifier.sol, where the signature checking library is imported. - Line 28 of
SignatureVerifier.sol, where the actual verification happens. - Line 23 of the Solady
SignatureCheckerLibsource file, where the library warns about malleability.
An import is how one file uses code from another. Instead of writing the checking logic from scratch, the contract says "bring in this library and let me use it". The library in question is called SignatureCheckerLib and comes from Solady, a collection of optimised Solidity utilities.
Finding it
The researcher read how SignatureVerifier.sol checks signatures. The contract imports SignatureCheckerLib from Solady and calls that library's isValidSignatureNow function to do the check.
A function is a named block of code that takes inputs and returns an output. isValidSignatureNow takes a signer, a message digest (a fixed-length fingerprint of the message) and a signature, and returns true or false: is this signature valid for this signer and this digest?
The important part is what that question does not cover. It does not ask "is this the only valid signature for this signer and digest?". The Solady documentation says so directly: the library does not prevent malleability, and anyone using it must add their own protection. The contract adds none.
That mismatch is the whole finding. The contract adds no malleability check of its own, which the library's documentation says the consumer must do.
Exploitation
The report does not run an attack against a live contract. It builds the case from the library's own documentation, quoted in the proof of concept.
Step 1: Read the library's warning
The proof of concept quotes the header comment at the top of the imported library:
/// WARNING! Do NOT use signatures as unique identifiers:
/// - Use a nonce in the digest to prevent replay attacks on the same contract.
/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.
/// EIP-712 also enables readable signing of typed data for better user safety.
> /// This implementation does NOT check if a signature is non-malleable.
library SignatureCheckerLib {
Line by line:
/// WARNING! Do NOT use signatures as unique identifiers:is a comment, text the compiler ignores, written for humans. It says: do not treat a signature as a unique ticket number. A unique identifier is something like an order number that should never repeat./// - Use a nonce in the digest to prevent replay attacks on the same contract.A nonce is a number used once. A replay attack is taking a valid message and sending it again to get the same effect twice, like photocopying a signed cheque. Putting a nonce inside the digest means each signed message is tied to one specific use, so a copy is rejected./// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.EIP-712 is a standard for structuring signed data so it is tied to a particular chain (a particular blockchain network) and a particular contract. Without it, a signature made for one deployment could be accepted by another./// EIP-712 also enables readable signing of typed data for better user safety.Because the data has a defined structure, a wallet can show the user a readable summary of what they are signing instead of a blob of hex.> /// This implementation does NOT check if a signature is non-malleable.The line that matters here. The>is a quote marker in the report, not part of the code. The sentence says the library does not check whether a signature can be reshaped into another valid form.library SignatureCheckerLib {opens the library itself, the block of reusable code that follows.
Step 2: Confirm the contract adds nothing
The researcher then compared that warning with the contract. SignatureVerifier.sol imports the library, calls isValidSignatureNow, and adds no malleability prevention on top. The gap is inherited straight from the library, with nothing in the protocol code to compensate.
Step 3: Reason about the consequence
Because nothing rejects a modified form of an existing signature, an existing signature can be manipulated and potentially reused. The report gives no concrete transaction, payload or on-chain result showing this happening. The argument rests on the documented behaviour of the library.
Root cause
The root cause is trusting a library for a property the library explicitly says it does not provide. SignatureCheckerLib.isValidSignatureNow answers "is this a valid signature for this signer and digest?" but not "is this the only valid signature for this signer and digest?". The contract adds no prevention against malleability on top of the library.
A canonical form is one agreed spelling of a value, the way a date could be written 2025-10-29 or 29/10/2025; if a system accepts both spellings as different values, it can be fooled. Rejecting non-canonical signatures means accepting only one spelling.
Nothing existing stopped it because there was nothing at this layer: the library's documentation puts the responsibility for malleability checks on whoever uses it, and the user of the library did not take that on.
Impact
Signature malleability can be abused by attackers for personal gain. The contract fails to fully guarantee the integrity of the signatures it verifies, even if no direct loss of funds occurs. The report is explicit that direct loss of funds is not established. The impact is the weakened integrity guarantee and the possibility of signature reuse or manipulation.
Fix
The report does not describe a fix that was applied. What it points to is the requirement stated by the library itself: anyone using it must implement their own checks against malleability. The report does not describe a fix; it notes the library requires consumers to implement their own malleability checks.
Variants to test
These are other places where the same kind of mistake could appear, useful if you want to look for similar bugs yourself:
- Other Solady consumers. Search a codebase for imports of
SignatureCheckerLiband check whether each place that calls it adds its own malleability handling. A positive result is a verification path that accepts a re-encoded form of a signature the signer produced. - Signatures used as identifiers. Look for signatures that are stored, compared or used as keys, for example to mark an action as done. A positive result is a second, differently encoded signature for the same message being accepted as a distinct action.
- Missing nonce in the digest. Check whether the signed digest includes a per-contract nonce. A positive result is the same signature being accepted twice for the same operation.
- Cross-chain and cross-contract replay. Check whether the digest is EIP-712 typed and domain-separated. A positive result is a signature valid on one deployment being accepted on another.
Hunting notes
This class of bug hides in thin wrapper contracts around well-known signature libraries: the wrapper looks like a safety layer, but it only forwards the call. The signal during review is an import of a signature checking library with no accompanying canonicalisation, nonce handling or uniqueness check where it is called, plus a comment in the library source that explicitly disclaims malleability protection.
On impact, the report is candid about its limits: it argues weakened integrity and possible reuse rather than demonstrated fund loss, and it is rated medium severity.
Glossary
- Smart contract: a program stored and run on a blockchain, which executes automatically when called.
- Blockchain: a shared, append-only record of transactions kept by many computers, so no single party can quietly rewrite it.
- Solidity: the programming language used to write smart contracts on Ethereum-style blockchains; files end in
.sol. - Repository: an online folder of code that keeps a history of changes.
- Signature: a short piece of cryptographic data proving that the holder of a private key approved a particular message.
- Private key: a secret number that lets its owner produce signatures.
- Public key: the matching public value that anyone can use to check those signatures.
- Digest: a fixed-length fingerprint of a message, produced by a hash function, that is what actually gets signed.
- Signature malleability: the property that one valid signature can be reshaped into a different signature that is still valid for the same signer and message.
- Library: a reusable bundle of code written by someone else that a program can import and call.
- Import: the statement that brings code from another file or library into the current file.
- Function: a named block of code that takes inputs and returns an output.
isValidSignatureNow: the Solady library function that checks whether a signature is valid for a signer and digest, returning true or false.- Nonce: a number used once, included in a signed message so that the same message cannot be replayed.
- Replay attack: resending a valid message or signature to get the same effect a second time.
- EIP-712: a standard for structuring and domain-separating signed data so a signature is tied to a specific chain and contract, and can be shown to the user in readable form.
- Chain: a particular blockchain network; a signature meant for one should not be accepted on another.
- Canonical form: the single agreed encoding of a value; rejecting non-canonical forms means accepting only that one spelling.
- Integrity: the guarantee that data has not been altered or substituted.
- Severity: the rating of how serious a finding is, here medium.
- Audit competition: an event where many researchers review the same code and submit findings for rewards.
- Proof of concept (PoC): the evidence in a report that demonstrates the issue, here a quoted snippet of library code.