GHSA-29h2-jr22-frmh: @openzeppelin/confidential contracts A Malicious ERC-7984 Token Is Vulnerability

HIGH
CWE-284
Published
Advisory Summary

GHSA-29h2-jr22-frmh is a HIGH a malicious erc-7984 token is vulnerability (CWE-284: Improper Access Control) affecting @openzeppelin/confidential contracts libraries in the npm ecosystem. The issue involves a malicious erc-7984 token is able to extract private data from the vesting wallet. Remediation is available by upgrading affected packages to version 0.3.2, 0.4.2, 0.5.2.

GHSA-29h2-jr22-frmh at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-29h2-jr22-frmh
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-284: Improper Access Control
Affected Product @openzeppelin/confidential contracts
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-29h2-jr22-frmh

To remediate this vulnerability, upgrade all affected @openzeppelin/confidential contracts dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@openzeppelin/confidential-contracts fixed: 0.3.2
npm install @openzeppelin/confidential-contracts@0.3.2
@openzeppelin/confidential-contracts fixed: 0.4.2
npm install @openzeppelin/confidential-contracts@0.4.2
@openzeppelin/confidential-contracts fixed: 0.5.2
npm install @openzeppelin/confidential-contracts@0.5.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @openzeppelin/confidential-contracts

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-29h2-jr22-frmh, inspect your project dependencies using npm:

npm ls @openzeppelin/confidential-contracts

Analyze the terminal output to locate any version of @openzeppelin/confidential contracts in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.2), your application is affected.

Note: The npm ls @openzeppelin/confidential-contracts command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In @openzeppelin/confidential contracts, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Two locations consume an encrypted handle returned by an untrusted external party and use it without verifying that the party is ACL-authorized on it. #### `VestingWalletConfidential` Malicious users can call `release` 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. #### ERC7984 On a transfer with callback, `ERC7984` 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 (the value is only used as an `FHE.select` condition), and there is no loss of funds. ### Patches Both issues were fixed in the same patch releases: v0.5.2, v0.4.2, v0.3.2 - `VestingWalletConfidential`: 93e75ceed2b9648f53f9d133f431064353456805 (#423). - `ERC7984` transfer callback: fe0863af2c9dce7614acce98720a913bf6a767a5 (#428), with follow-up ee47edf189ab681cebdad18bfb53dee541987be2 (#431) permitting an uninitialized returned handle.

GHSA-29h2-jr22-frmh Affected @openzeppelin/confidential contracts Versions

3 component(s)
Fixed Versions:
0.3.20.4.20.5.2
Product / Package Ecosystem Affected Versions Fixed Version
@openzeppelin/confidential-contracts
npm
< 0.3.2
0.3.2
@openzeppelin/confidential-contracts
npm
≥ 0.4.0-rc.0
< 0.4.2
0.4.2
@openzeppelin/confidential-contracts
npm
≥ 0.5.0-rc.0
< 0.5.2
0.5.2

References

GitHub Advisory / Wiki ADVISORY
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/security/advisories/GHSA-29h2-jr22-frmh
@openzeppelin/confidential contracts Source Repository REPOSITORY
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/423
@openzeppelin/confidential contracts Source Repository REPOSITORY
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/428
@openzeppelin/confidential contracts Source Repository REPOSITORY
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/431
Security Fix Commit FIX COMMIT
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/commit/93e75ceed2b9648f53f9d133f431064353456805
Security Fix Commit FIX COMMIT
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/commit/ee47edf189ab681cebdad18bfb53dee541987be2
Security Fix Commit FIX COMMIT
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/commit/fe0863af2c9dce7614acce98720a913bf6a767a5
@openzeppelin/confidential contracts Source Repository REPOSITORY
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts
@openzeppelin/confidential contracts Release RELEASE
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/releases/tag/v0.3.2
@openzeppelin/confidential contracts Release RELEASE
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/releases/tag/v0.4.2
@openzeppelin/confidential contracts Release RELEASE
https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/releases/tag/v0.5.2

Frequently Asked Questions

What is GHSA-29h2-jr22-frmh?
GHSA-29h2-jr22-frmh is a security vulnerability in @openzeppelin/confidential contracts involving a malicious ERC-7984 token is able to extract private data from the vesting wallet under CWE-284: Improper Access Control.
Which @openzeppelin/confidential contracts versions are affected?
Affected versions include releases prior to 0.3.2, 0.4.2, 0.5.2 across affected packages: @openzeppelin/confidential-contracts.
What version fixes GHSA-29h2-jr22-frmh?
Upgrading to 0.3.2, 0.4.2, 0.5.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @openzeppelin/confidential-contracts affected?
Yes, @openzeppelin/confidential-contracts is affected in releases prior to 0.3.2, 0.4.2, 0.5.2. Upgrade your dependency to 0.3.2, 0.4.2, 0.5.2 or later.
What CWE is associated with GHSA-29h2-jr22-frmh?
GHSA-29h2-jr22-frmh is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check npm dependencies for GHSA-29h2-jr22-frmh?
Run the dependency tree command: 'npm ls @openzeppelin/confidential-contracts'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-29h2-jr22-frmh",
  "modified" : "2026-09-25T19:31:08Z",
  "published" : "2026-09-25T19:31:08Z",
  "aliases" : [ ],
  "summary" : "OpenZeppelin Confidential Contracts `VestingWalletConfidential`: a malicious ERC-7984 token is able to extract private data from the vesting wallet",
  "details" : "### Impact\n\nTwo locations consume an encrypted handle returned by an untrusted external party and use it without verifying that the party is ACL-authorized on it.\n\n#### `VestingWalletConfidential`\n\nMalicious users can call `release` 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.\n\nEffectively, 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.\n\n#### ERC7984\n\nOn a transfer with callback, `ERC7984` uses the `ebool` returned by the\nrecipient's `IERC7984Receiver.onConfidentialTransferReceived` to drive the refund\nlogic, without checking that the recipient has ACL access to it. A malicious recipient\ncan return any `ebool` the token has access to and recover its plaintext from the\nrefund result, which the token grants the caller access to. The leak is limited\nto `ebool` handles (the value is only used as an `FHE.select` condition), and\nthere is no loss of funds.\n\n### Patches\n\nBoth issues were fixed in the same patch releases: v0.5.2, v0.4.2, v0.3.2\n\n- `VestingWalletConfidential`: 93e75ceed2b9648f53f9d133f431064353456805 (#423).\n- `ERC7984` transfer callback: fe0863af2c9dce7614acce98720a913bf6a767a5 (#428), with follow-up ee47edf189ab681cebdad18bfb53dee541987be2 (#431) permitting an uninitialized returned handle.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@openzeppelin/confidential-contracts"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@openzeppelin/confidential-contracts"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.4.0-rc.0"
      }, {
        "fixed" : "0.4.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@openzeppelin/confidential-contracts"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.5.0-rc.0"
      }, {
        "fixed" : "0.5.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/security/advisories/GHSA-29h2-jr22-frmh"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/423"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/428"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/pull/431"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/commit/93e75ceed2b9648f53f9d133f431064353456805"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/commit/ee47edf189ab681cebdad18bfb53dee541987be2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/commit/fe0863af2c9dce7614acce98720a913bf6a767a5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/releases/tag/v0.3.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/releases/tag/v0.4.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/releases/tag/v0.5.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-25T19:31:08Z",
    "nvd_published_at" : null
  }
}