Listen to this Post
The vulnerability arises from two distinct locations within the confidential token framework where an encrypted handle returned by an untrusted external party is consumed without verifying that the party is ACL-authorized on it. In the VestingWalletConfidential contract, malicious users can call the `release` function with a malicious token. This token could return an alternative handle on confidentialBalanceOf, which represents the balance of the vesting wallet on an alternative ERC-7984 token or any other handle that the vesting wallet has access to. The vesting wallet does not check that the token has ACL access and grants access to a new handle derived from the returned handle. Effectively, this bug allows a malicious user to gain information about any private `euint64` handle that the vesting wallet has access to via a malicious ERC-7984 token. There is no loss of funds.
In the ERC7984 contract, on a transfer with callback, the token uses the `ebool` returned by the recipient’s `IERC7984Receiver.onConfidentialTransferReceived` to drive the refund logic, without checking that the recipient has ACL access to it. A malicious recipient can return any `ebool` the token has access to and recover its plaintext from the refund result, which the token grants the caller access to. The leak is limited to `ebool` handles, as the value is only used as an `FHE.select` condition, and there is no loss of funds. Both issues were fixed in the same patch releases: v0.5.2, v0.4.2, v0.3.2. The VestingWalletConfidential fix is commit `93e75ceed2b9648f53f9d133f431064353456805` (423), and the ERC7984 transfer callback fix is commit `fe0863af2c9dce7614acce98720a913bf6a767a5` (428), with a follow-up `ee47edf189ab681cebdad18bfb53dee541987be2` (431) permitting an uninitialized returned handle.
DailyCVE Form:
Platform: Confidential Token
Version: v0.5.1 v0.4.1
Vulnerability : ACL bypass
Severity: Medium
date: 2025-01-15
Prediction: Patch released
What Undercode Say:
Analytics:
Examine VestingWalletConfidential release function cast call $VESTING_WALLET "release(address)" $MALICIOUS_TOKEN Check ACL permissions on returned handle cast call $ACL_CONTRACT "isAllowed(bytes32,address)" $RETURNED_HANDLE $VESTING_WALLET Test ERC7984 callback with malicious ebool cast send $ERC7984_TOKEN "transferWithCallback(address,uint256,bytes)" $RECIPIENT $AMOUNT $CALLBACK_DATA Decrypt refund result to extract ebool plaintext cast call $ERC7984_TOKEN "decryptHandle(bytes32)" $REFUND_EB00L_HANDLE
How Exploit: (Educational Purposes!)
- Deploy a malicious ERC-7984 token contract that returns an arbitrary handle from `confidentialBalanceOf` when called by the vesting wallet during
release. - The vesting wallet grants ACL access to a new handle derived from the returned handle, leaking information about private `euint64` balances.
- For ERC7984, deploy a malicious receiver contract that returns any `ebool` handle the token has access to from
onConfidentialTransferReceived. - The token uses this `ebool` in `FHE.select` for refund logic, allowing the attacker to decrypt the refund result and recover the plaintext of the leaked
ebool.
Protection: from this CVE
- Upgrade to patched versions v0.5.2, v0.4.2, or v0.3.2.
- Implement ACL verification on any handle returned by external contracts before using it.
- Validate that the caller or external party has the necessary ACL permissions on returned handles.
- Use the follow-up fix that permits an uninitialized returned handle to avoid similar issues.
Impact:
Information leak of private encrypted handles (euint64 and ebool). No loss of funds. Malicious users can gain information about any private handle the vesting wallet has access to via a malicious ERC-7984 token. The leak is limited to `ebool` handles in the ERC7984 case, with the value only used as an `FHE.select` condition.
🎯Let’s Practice Exploiting & Learn Patching For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

