CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-29H2-JR22-FRMH

GHSA-29H2-JR22-FRMH: Improper Access Control and Handle Substitution in OpenZeppelin Confidential Contracts

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 25, 2026·6 min read·15 visits

Executive Summary (TL;DR)

OpenZeppelin Confidential Contracts prior to v0.3.2, v0.4.2, and v0.5.2 are vulnerable to handle substitution attacks. Untrusted external parties can return arbitrary encrypted handles that are consumed without ACL validation, resulting in side-channel plaintext leaks of private FHE states.

A critical access control vulnerability exists in the OpenZeppelin Confidential Contracts library for Fully Homomorphic Encryption (FHE) on EVM networks. Due to missing Access Control List (ACL) verification on encrypted FHE handles returned by untrusted external contracts, malicious actors can perform handle substitution attacks. This allows attackers to harvest unauthorized private FHE handles and leak their underlying plaintext values through logical side-channels in subsequent contract operations.

Vulnerability Overview

The @openzeppelin/confidential-contracts library provides essential primitives for constructing privacy-preserving tokens and financial instruments on EVM-compatible networks using Fully Homomorphic Encryption (FHE). Unlike standard transparent blockchains, FHE-enabled smart contracts perform computations on encrypted data states (such as private balances or boolean conditions) without ever decrypting them. The primary attack surface exposed by this architecture involves how data handles are passed across contract trust boundaries.

To interact with encrypted states within EVM constraints, frameworks like Zama's fhEVM represent encrypted payloads using global cryptographic reference pointers termed "handles" (e.g., ebool, euint64). The security and isolation of these handles rely on an Access Control List (ACL) enforced by the underlying virtual machine, which dictates which smart contracts have authorization to read or compute over specific handle IDs.

This vulnerability represents a systemic architectural validation failure in how handles returned by untrusted external contracts are ingested. Specifically, both VestingWalletConfidential and the ERC7984 transfer callback logic consume ciphertext handles from untrusted entities without verifying that the sending contract has ACL authorization over those handles. This allows an attacker to conduct a handle substitution attack, supplying sensitive handles belonging to other contracts and extracting their plaintext contents.

Root Cause Analysis

The fundamental root cause of the vulnerability is the implicit trust placed in FHE handles returned from external calls. In traditional Solidity development, returning an arbitrary data type does not compromise security because variables are scoped. However, FHE handles are global 32-bit or 64-bit integer values pointing to a shared enclave state. Because handles lack inherent namespaces, any contract can attempt to pass any handle ID to another contract.

In VestingWalletConfidential, the vestedAmount function calculates linear vesting by calling IERC7984(token).confidentialBalanceOf(address(this)). Because the returned balance handle was consumed in FHE arithmetic operations (FHE.add) without asserting that the token contract was ACL-authorized on that handle, a malicious token could return an arbitrary handle representing a sensitive private state of the wallet. The wallet would then perform arithmetic operations on this swapped handle and register transit permissions, creating an oracle that leaks private states.

In ERC7984 transfer callbacks, a similar flaw occurs during the evaluation of recipient responses. When performing a transfer with a callback, the token contract executes onConfidentialTransferReceived and expects an ebool handle indicating success or failure. The contract then uses this handle as a condition parameter in FHE.select to determine if a refund is required. Because there is no validation to confirm that the recipient has ACL authorization to the returned ebool, an attacker can pass a victim's encrypted boolean handle. The subsequent transaction execution patterns (whether a refund occurred or not) allow the attacker to deduce the underlying plaintext bit of the victim's handle.

Code-Level Analysis and Patch Diff

A detailed review of the patches reveals how validation controls were integrated to remediate the handle substitution vectors.

In VestingWalletConfidential.sol, the vulnerability was resolved by introducing a validation function, _checkTokenHandleAccess, which asserts that the token has ACL permissions for the returned handle before performing FHE arithmetic operations. Uninitialized handles (representing zero balances) are ignored to prevent honest zero-value transfers from reverting.

// Patched VestingWalletConfidential.sol
function vestedAmount(address token, uint48 timestamp) public virtual returns (euint128) {
    euint64 balance = IERC7984(token).confidentialBalanceOf(address(this));
    // Fix: Assert that the token contract is authorized on the returned handle
    _checkTokenHandleAccess(token, balance);
    return _vestingSchedule(FHE.add(released(token), balance), timestamp);
}
 
function _checkTokenHandleAccess(address token, euint64 handle) private view {
    require(
        !FHE.isInitialized(handle) || FHE.isAllowed(handle, token),
        VestingWalletConfidentialUnauthorizedHandle(handle, token)
    );
}

In ERC7984Utils.sol, the callback handler was fortified to ensure the recipient contract has actual permissions for the returned boolean handle. The logic checks that either the handle is uninitialized (handling non-FHE receivers safely) or that the recipient is authorized on it via FHE.isAllowed.

// Patched ERC7984Utils.sol
try IERC7984Receiver(to).onConfidentialTransferReceived(operator, from, amount, data) returns (
    ebool retval
) {
    // Fix: Enforce ACL authorization check on returned callback handle
    require(
        !FHE.isInitialized(retval) || FHE.isAllowed(retval, to),
        ERC7984UtilsUnauthorizedUseOfEncryptedAmount(retval, to)
    );
    return retval;
} catch (bytes memory reason) {
    // standard fallback handling
}

Exploitation Methodology & Side-Channel Mechanics

To exploit this vulnerability, an attacker constructs a malicious contract that registers as an ERC-7984 token or receiver, allowing them to inject targeted handles into the victim contract's execution thread.

In a callback-driven attack, the adversary target is a confidential boolean value (Target_Bool). The attacker deploys a contract implementing IERC7984Receiver and configures its onConfidentialTransferReceived function to return the handle ID of Target_Bool instead of a newly generated execution status. The attacker then executes a transfer targeting their own receiver contract.

When the token contract processes the transfer, it triggers the callback and receives the substituted handle. It then evaluates the conditional check FHE.select(Target_Bool, refundAmount, zeroAmount). Because the outcome of this transaction (specifically, whether the attacker receives a refund or not) is visible on-chain, the attacker directly observes the logical evaluation of Target_Bool. If the refund is executed, Target_Bool evaluated to false; otherwise, it evaluated to true. This side-channel completely decrypts the target boolean without requiring direct access keys.

Remediation and Mitigation Guidance

Remediation requires upgrading @openzeppelin/confidential-contracts dependencies to versions that enforce strict ACL validation. Project maintainers must audit their configurations to ensure they are on the patched release lines: 0.3.2 for the 0.3.x line, 0.4.2 for the 0.4.x line, and 0.5.2 for the 0.5.x line.

When developing custom FHE-based contracts outside of the OpenZeppelin ecosystem, engineers must follow defensive design principles for handles. Every external call that returns an FHE handle should be subjected to an explicit validation check using FHE.isAllowed(handle, sender) before incorporating the handle into internal arithmetic, comparison, or storage routines. Additionally, developers should design fallback mechanisms to ignore uninitialized handles to prevent Denial of Service (DoS) attacks on non-FHE integrations.

Official Patches

OpenZeppelinOfficial Security Advisory for GHSA-29H2-JR22-FRMH

Fix Analysis (3)

Technical Appendix

CVSS Score
7.1/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Affected Systems

OpenZeppelin Confidential Contracts library installations on EVM-compatible networks using FHE schemas (such as Zama fhEVM).

Affected Versions Detail

Product
Affected Versions
Fixed Version
@openzeppelin/confidential-contracts
OpenZeppelin
< 0.3.20.3.2
@openzeppelin/confidential-contracts
OpenZeppelin
>= 0.4.0-rc.0, < 0.4.20.4.2
@openzeppelin/confidential-contracts
OpenZeppelin
>= 0.5.0-rc.0, < 0.5.20.5.2
AttributeDetail
CWE IDCWE-284: Improper Access Control
Attack VectorNetwork
CVSS v4.0 Score7.1
ImpactHigh (Unauthorized disclosure of FHE state plaintext)
Exploit Statuspoc
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1548Abuse Elevation Control Mechanism
Privilege Escalation
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-284
Improper Access Control

The software does not restrict or incorrectly restricts access to a resource from an unauthorized actor.

Known Exploits & Detection

GitHub (Mock Unit Tests)Unit tests in the repository mock the deployment of an unauthorized receiver returning arbitrary victim handles to trigger handle consumption validation failures.

Vulnerability Timeline

VestingWalletConfidential validation patch committed (Commit 93e75ceed2b9648f53f9d133f431064353456805)
2026-07-29
ERC7984 Callback validation patch committed (Commit fe0863af2c9dce7614acce98720a913bf6a767a5)
2026-08-03
Uninitialized callback handle refinement patch committed (Commit ee47edf189ab681cebdad18bfb53dee541987be2)
2026-08-04
Advisory GHSA-29H2-JR22-FRMH officially published. Patched releases v0.3.2, v0.4.2, and v0.5.2 made public.
2026-09-25

References & Sources

  • [1]GitHub Security Advisory GHSA-29H2-JR22-FRMH
  • [2]Pull Request #423: Vesting Wallet Fix
  • [3]Pull Request #428: ERC7984 Callback Fix
  • [4]Pull Request #431: Uninitialized Return Fix

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-16454
4.3

CVE-2026-16454: Object-Level Authorization Bypass in Eclipse hawkBit Direct Device Integration Controller

CVE-2026-16454 is an object-level authorization bypass vulnerability (CWE-284, CWE-862) in Eclipse hawkBit versions 1.0.3 and prior. The flaw exists within the Direct Device Integration (DDI) REST controller (hawkbit-ddi-resource), where endpoints responsible for enumerating software module metadata and serving firmware binaries fail to verify whether the requested software module is assigned to the authenticated device. Consequently, any device with valid credentials (such as a TargetToken or GatewayToken) can enumerate software module identifiers and download arbitrary firmware artifacts across the entire tenant namespace.

Amit Schendel
Amit Schendel
11 views•9 min read
•2 days ago•CVE-2026-62284
8.6

CVE-2026-62284: Remote Code Execution and SSRF via Unsanitized Kubeconfig in OSAC Operator

CVE-2026-62284 (GHSA-5w5g-j6hw-6p8f) is a code injection and server-side request forgery vulnerability in the console-proxy component of the OSAC Operator. The RemoteConfigResolver parses Kubernetes Secrets containing kubeconfig files via clientcmd.RESTConfigFromKubeConfig without sanitizing execution-related fields. An attacker with RBAC permissions to create or modify labeled Secrets in monitored namespaces can supply a malicious exec credential plugin, resulting in arbitrary command execution within the console-proxy pod.

Amit Schendel
Amit Schendel
8 views•8 min read
•2 days ago•CVE-2026-62361
5.5

CVE-2026-62361: Authenticated SQL Injection and Table Access Control Bypass in Listmonk Subscriber Export

CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).

Alon Barad
Alon Barad
10 views•11 min read
•2 days ago•CVE-2026-28385
5.0

CVE-2026-28385: Server-Side Request Forgery in Canonical LXD Image Import

CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.

Amit Schendel
Amit Schendel
10 views•9 min read
•2 days ago•GHSA-9J25-MM2H-2F76
9.9

CVE-2026-48750: Arbitrary File Write on Host via exec-output Symlink in Canonical LXD and Incus

Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.

Alon Barad
Alon Barad
8 views•12 min read
•2 days ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
8 views•9 min read