Vulnerabilities in pkg:npm/@metamask/sdk-react
PACKAGEGHSA-qj3p-xc97-xw74 is a MODERATE metamask sdk indirectly exposed vulnerability (CWE-506: Embedded Malicious Code) affecting @metamask/sdk libraries in the npm ecosystem. The issue involves metamask sdk indirectly exposed via malicious debug@4.4.2 dependency. Remediation is available by upgrading affected packages to version 0.33.1.
pkg:npm/@metamask/sdk-react
Vulnerability advisories affecting package pkg:npm/@metamask/sdk-react. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-qj3p-xc97-xw74 | - | MODERATE | MetaMask SDK indirectly exposed via malicious debug@4.4.2 dependency |
GHSA-qj3p-xc97-xw74 at a Glance
How to Fix GHSA-qj3p-xc97-xw74
To remediate this vulnerability, upgrade all affected @metamask/sdk dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @metamask/sdk@0.33.1
npm install @metamask/sdk-react@0.33.1
npm install @metamask/sdk-communication-layer@0.33.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @metamask/sdk
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-qj3p-xc97-xw74, inspect your project dependencies using npm:
npm ls @metamask/sdk
Analyze the terminal output to locate any version of @metamask/sdk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.33.1), your application is affected.
Note: The npm ls @metamask/sdk 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-506: Embedded Malicious Code, where the product contains code that appears to be malicious in nature. In @metamask/sdk, 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
GHSA-qj3p-xc97-xw74 Affected @metamask/sdk Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@metamask/sdk
|
npm |
≥ 0.16.0
< 0.33.1
|
0.33.1
|
|
@metamask/sdk-react
|
npm |
≥ 0.16.0
< 0.33.1
|
0.33.1
|
|
@metamask/sdk-communication-layer
|
npm |
≥ 0.16.0
< 0.33.1
|
0.33.1
|
References
Frequently Asked Questions
What is GHSA-qj3p-xc97-xw74?
Which @metamask/sdk versions are affected?
What version fixes GHSA-qj3p-xc97-xw74?
Is @metamask/sdk affected?
Is @metamask/sdk-react affected?
What CWE is associated with GHSA-qj3p-xc97-xw74?
How can I check npm dependencies for GHSA-qj3p-xc97-xw74?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qj3p-xc97-xw74",
"modified" : "2025-09-15T13:55:56Z",
"published" : "2025-09-15T13:55:56Z",
"aliases" : [ ],
"summary" : "MetaMask SDK indirectly exposed via malicious debug@4.4.2 dependency",
"details" : "### Who is affected?\nThis advisory only applies to developers who use MetaMask SDK in the browser and who, on Sept 8th 2025 between 13:00–15:30 UTC, performed one of the following actions and then deployed their application:\n- Installed MetaMask SDK into a project with a lockfile for the first time\n- Installed MetaMask SDK in a project without a lockfile\n- Updated a lockfile to pull in `debug@4.4.2` (e.g., via `npm update` or `yarn upgrade`)\n\n### What happened?\nOn Sept 8th, 2025 (13:00–15:30 UTC), a malicious version of the `debug` package (v4.4.2) was published to npm. The injected code attempts to interfere with dApp-to-wallet communication when executed in a browser context. \n\nWhile MetaMask SDK itself was not directly impacted, projects installing the SDK during this window may have inadvertently pulled in the malicious version of `debug`.\n\n### Mitigation\n- If your application was rebuilt and redeployed after Sept 8th, 2025, 15:30 UTC, the malicious version of debug should no longer be present. Please also verify that your package manager (npm, yarn, pnpm, etc.) is not caching `debug@4.4.2`.\n- If you have not yet deployed since performing one of the actions above, delete your `node_modules` and reinstall dependencies before deploying.\n- If your application was deployed during the attack window and has not been rebuilt since, perform a clean install of dependencies and redeploy to ensure the malicious package is removed.\n\n### Resources\n[GitHub Advisory for debug](https://github.com/advisories/GHSA-8mgj-vmr8-frr6)",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@metamask/sdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.16.0"
}, {
"fixed" : "0.33.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.33.0"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@metamask/sdk-react"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.16.0"
}, {
"fixed" : "0.33.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.33.0"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@metamask/sdk-communication-layer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.16.0"
}, {
"fixed" : "0.33.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.33.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/MetaMask/metamask-sdk/security/advisories/GHSA-qj3p-xc97-xw74"
}, {
"type" : "WEB",
"url" : "https://github.com/MetaMask/metamask-sdk/pull/1342"
}, {
"type" : "WEB",
"url" : "https://github.com/MetaMask/metamask-sdk/commit/baa185c6cfa97755a3d389d956372ad9eb37c4a4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/MetaMask/metamask-sdk"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-506" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-15T13:55:56Z",
"nvd_published_at" : null
}
}