CWE-506
Allowed-with-ReviewEmbedded Malicious Code
Abstraction: Class · Status: Incomplete
The product contains code that appears to be malicious in nature.
525 vulnerabilities reference this CWE, most recent first.
GHSA-FPGG-R39H-3X5X
Vulnerability from github – Published: 2020-09-03 17:06 – Updated: 2021-10-01 21:00All versions of this package contained malware. The package was designed to find and exfiltrate cryptocurrency wallets.
Recommendation
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer.
The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "cxt"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:57:36Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of this package contained malware. The package was designed to find and exfiltrate cryptocurrency wallets.\n\n\n## Recommendation\n\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer.\n\nThe package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.",
"id": "GHSA-fpgg-r39h-3x5x",
"modified": "2021-10-01T21:00:43Z",
"published": "2020-09-03T17:06:22Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1392"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Malicious Package in cxt"
}
GHSA-FPW3-X4XQ-6VXQ
Vulnerability from github – Published: 2020-09-02 18:32 – Updated: 2021-10-01 13:46All versions of wepack-cli typosquatted a popular package of similar name and tracked users who had installed the incorrect package. The package uploaded information to a remote server including: name of the downloaded package, name of the intended package, the Node version and whether the process was running as sudo. There is no further compromise.
Recommendation
Remove the package from your dependencies and always ensure package names are typed correctly upon installation.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "wepack-cli"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:37:41Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `wepack-cli` typosquatted a popular package of similar name and tracked users who had installed the incorrect package. The package uploaded information to a remote server including: name of the downloaded package, name of the intended package, the Node version and whether the process was running as sudo. There is no further compromise.\n\n\n## Recommendation\n\nRemove the package from your dependencies and always ensure package names are typed correctly upon installation.",
"id": "GHSA-fpw3-x4xq-6vxq",
"modified": "2021-10-01T13:46:23Z",
"published": "2020-09-02T18:32:13Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/839"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Malicious Package in wepack-cli"
}
GHSA-FQW7-8V6M-2F86
Vulnerability from github – Published: 2020-09-02 21:37 – Updated: 2021-09-30 21:54All versions of hulp contain malicious code as a preinstall script. When installed, the package calls home to a Command and Control server to execute arbitrary commands.
Recommendation
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer.
The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "hulp"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:40:01Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `hulp` contain malicious code as a preinstall script. When installed, the package calls home to a Command and Control server to execute arbitrary commands.\n\n\n## Recommendation\n\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer.\n\nThe package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.",
"id": "GHSA-fqw7-8v6m-2f86",
"modified": "2021-09-30T21:54:46Z",
"published": "2020-09-02T21:37:39Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/905"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Malicious Package in hulp"
}
GHSA-FRH7-2F84-V9MW
Vulnerability from github – Published: 2025-09-15 23:58 – Updated: 2025-09-15 23:58Impact
On 8 September 2025, an npm publishing account for is-arrayish was taken over after a phishing attack. Version 0.3.3 was published, functionally identical to the previous patch version, but with a malware payload added attempting to redirect cryptocurrency transactions to the attacker's own addresses from within browser environments.
Local environments, server environments, command line applications, etc. are not affected. If the package was used in a browser context (e.g. a direct <script> inclusion, or via a bundling tool such as Babel, Rollup, Vite, Next.js, etc.) there is a chance the malware still exists and such bundles will need to be rebuilt.
The malware seemingly only targets cryptocurrency transactions and wallets such as MetaMask. See references below for more information on the payload.
Patches
npm removed the offending package from the registry over the course of the day on 8 September, preventing further downloads from npm proper.
On 13 September, the package owner published new patch versions to help cache-bust those using private registries who might still have the compromised version cached. This version is functionally identical to the previously known-good version, published as a patch version bump above the compromised version.
Users should update to the latest patch version, completely remove their node_modules directory, clean their package manager's global cache, and rebuild any browser bundles from scratch.
Those operating private registries or registry mirrors should purge the offending versions from any caches.
References
- https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised
- https://socket.dev/blog/npm-author-qix-compromised-in-major-supply-chain-attack
- https://www.ox.security/blog/npm-packages-compromised/
Point of Contact
In the event suspicious behavior is still observed for the package listed in this security advisory after performing all of the above cleaning operations (see Patches above), please reach out via one of the following channels of communication:
- Bluesky, compromised publishing account owner: https://bsky.app/profile/bad-at-computer.bsky.social
debugrepository, tracking issue (applies to all packages affected in the breach): https://github.com/debug-js/debug/issues/1005
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "is-arrayish"
},
"ranges": [
{
"events": [
{
"introduced": "0.3.3"
},
{
"fixed": "0.3.4"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.3.3"
]
}
],
"aliases": [
"CVE-2025-59331"
],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2025-09-15T23:58:46Z",
"nvd_published_at": "2025-09-15T20:15:39Z",
"severity": "HIGH"
},
"details": "### Impact\nOn 8 September 2025, an npm publishing account for `is-arrayish` was taken over after a phishing attack. Version `0.3.3` was published, functionally identical to the previous patch version, but with a malware payload added attempting to redirect cryptocurrency transactions to the attacker\u0027s own addresses from within browser environments.\n\nLocal environments, server environments, command line applications, etc. are not affected. If the package was used in a browser context (e.g. a direct `\u003cscript\u003e` inclusion, or via a bundling tool such as Babel, Rollup, Vite, Next.js, etc.) there is a chance the malware still exists and such bundles will need to be rebuilt.\n\nThe malware seemingly only targets cryptocurrency transactions and wallets such as MetaMask. See references below for more information on the payload.\n\n### Patches\nnpm removed the offending package from the registry over the course of the day on 8 September, preventing further downloads from npm proper.\n\nOn 13 September, the package owner published new patch versions to help cache-bust those using private registries who might still have the compromised version cached. This version is functionally identical to the previously known-good version, published as a patch version bump above the compromised version.\n\nUsers should update to the latest patch version, completely remove their `node_modules` directory, clean their package manager\u0027s global cache, and rebuild any browser bundles from scratch.\n\nThose operating private registries or registry mirrors should purge the offending versions from any caches.\n\n### References\n- https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised\n- https://socket.dev/blog/npm-author-qix-compromised-in-major-supply-chain-attack\n- https://www.ox.security/blog/npm-packages-compromised/\n\n### Point of Contact\nIn the event suspicious behavior is still observed for the package listed in this security advisory after performing all of the above cleaning operations (see _Patches_ above), please reach out via one of the following channels of communication:\n\n- Bluesky, compromised publishing account owner: https://bsky.app/profile/bad-at-computer.bsky.social\n- `debug` repository, tracking issue (applies to all packages affected in the breach): https://github.com/debug-js/debug/issues/1005",
"id": "GHSA-frh7-2f84-v9mw",
"modified": "2025-09-15T23:58:46Z",
"published": "2025-09-15T23:58:46Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Qix-/node-is-arrayish/security/advisories/GHSA-frh7-2f84-v9mw"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-59331"
},
{
"type": "WEB",
"url": "https://github.com/debug-js/debug/issues/1005"
},
{
"type": "PACKAGE",
"url": "https://github.com/Qix-/node-is-arrayish"
},
{
"type": "WEB",
"url": "https://socket.dev/blog/npm-author-qix-compromised-in-major-supply-chain-attack"
},
{
"type": "WEB",
"url": "https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised"
},
{
"type": "WEB",
"url": "https://www.ox.security/blog/npm-packages-compromised"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N/E:A/U:Red",
"type": "CVSS_V4"
}
],
"summary": "is-arrayish@0.3.3 contains malware after npm account takeover"
}
GHSA-FRXQ-V7FM-M4PV
Vulnerability from github – Published: 2020-09-02 20:27 – Updated: 2021-10-01 14:04All versions of requuest typosquatted a popular package of similar name and tracked users who had installed the incorrect package. The package uploaded information to a remote server including: name of the downloaded package, name of the intended package, the Node version and whether the process was running as sudo. There is no further compromise.
Recommendation
Remove the package from your dependencies and always ensure package names are typed correctly upon installation.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "requuest"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:38:27Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `requuest` typosquatted a popular package of similar name and tracked users who had installed the incorrect package. The package uploaded information to a remote server including: name of the downloaded package, name of the intended package, the Node version and whether the process was running as sudo. There is no further compromise.\n\n\n## Recommendation\n\nRemove the package from your dependencies and always ensure package names are typed correctly upon installation.",
"id": "GHSA-frxq-v7fm-m4pv",
"modified": "2021-10-01T14:04:59Z",
"published": "2020-09-02T20:27:53Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/859"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Malicious Package in requuest"
}
GHSA-FV9M-F7W4-889C
Vulnerability from github – Published: 2018-08-06 21:43 – Updated: 2023-09-09 00:00The discordi.js package is malware that attempts to discover and exfiltrate a user's Discord credentials, sending them to pastebin.
All versions have been unpublished from the npm registry.
Recommendation
Do not install / use this module. It has been unpublished from the npm registry but may exist in some caches. Any users that logged into Discord using this library will need to change their credentials.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "discordi.js"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "14.0.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2017-16207"
],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:35:18Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "The `discordi.js` package is malware that attempts to discover and exfiltrate a user\u0027s [Discord](https://discordapp.com/) credentials, sending them to pastebin.\n\nAll versions have been unpublished from the npm registry.\n\n\n## Recommendation\n\nDo not install / use this module. It has been unpublished from the npm registry but may exist in some caches. Any users that logged into Discord using this library will need to change their credentials.",
"id": "GHSA-fv9m-f7w4-889c",
"modified": "2023-09-09T00:00:04Z",
"published": "2018-08-06T21:43:03Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16207"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-fv9m-f7w4-889c"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/545"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "discordi.js is malware"
}
GHSA-FW76-P9P2-6PVF
Vulnerability from github – Published: 2020-09-03 19:58 – Updated: 2021-09-30 20:28This package contained malicious code. The package uploaded system information such as OS and hostname to a remote server.
Recommendation
Remove the package from your environment. There are no indications of further compromise.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "serilize"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:48:43Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "This package contained malicious code. The package uploaded system information such as OS and hostname to a remote server.\n\n\n## Recommendation\n\nRemove the package from your environment. There are no indications of further compromise.",
"id": "GHSA-fw76-p9p2-6pvf",
"modified": "2021-09-30T20:28:12Z",
"published": "2020-09-03T19:58:58Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1140"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Malicious Package in serilize"
}
GHSA-FWVQ-X4J9-HR5F
Vulnerability from github – Published: 2020-09-03 19:43 – Updated: 2021-10-01 20:50All versions of this package contained malware. The package was designed to find and exfiltrate cryptocurrency wallets.
Recommendation
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer.
The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "bs58chekc"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:57:02Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of this package contained malware. The package was designed to find and exfiltrate cryptocurrency wallets.\n\n\n## Recommendation\n\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer.\n\nThe package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.",
"id": "GHSA-fwvq-x4j9-hr5f",
"modified": "2021-10-01T20:50:01Z",
"published": "2020-09-03T19:43:09Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1377"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Malicious Package in bs58chekc"
}
GHSA-G2C4-4M64-VXM3
Vulnerability from github – Published: 2020-09-03 22:15 – Updated: 2021-09-29 21:25Version 2.0.2 contained malicious code. The package targeted the Ethereum cryptocurrency and performed transactions to wallets not controlled by the user.
Recommendation
Remove the package from your environment. Ensure no Ethereum funds were compromised.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "buffer-yor"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:52:32Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Version 2.0.2 contained malicious code. The package targeted the Ethereum cryptocurrency and performed transactions to wallets not controlled by the user.\n\n\n## Recommendation\n\nRemove the package from your environment. Ensure no Ethereum funds were compromised.",
"id": "GHSA-g2c4-4m64-vxm3",
"modified": "2021-09-29T21:25:10Z",
"published": "2020-09-03T22:15:25Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1254"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Malicious Package in buffer-yor"
}
GHSA-G2Q5-5433-RHRF
Vulnerability from github – Published: 2021-11-04 16:24 – Updated: 2022-09-07 22:17The npm package rc had versions published with malicious code. Users of affected versions (1.2.9, 1.3.9, and 2.3.9) should downgrade to 1.2.8 as soon as possible and check their systems for suspicious activity.
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "rc"
},
"versions": [
"1.2.9"
]
},
{
"package": {
"ecosystem": "npm",
"name": "rc"
},
"versions": [
"1.3.9"
]
},
{
"package": {
"ecosystem": "npm",
"name": "rc"
},
"versions": [
"2.3.9"
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2021-11-04T16:20:31Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "The npm package\u00a0`rc`\u00a0had versions published with malicious code. Users of affected versions (1.2.9, 1.3.9, and 2.3.9) should downgrade to 1.2.8 as soon as possible and check their systems for suspicious activity.\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.",
"id": "GHSA-g2q5-5433-rhrf",
"modified": "2022-09-07T22:17:03Z",
"published": "2021-11-04T16:24:44Z",
"references": [
{
"type": "PACKAGE",
"url": "https://github.com/dominictarr/rc"
},
{
"type": "WEB",
"url": "https://therecord.media/malware-found-in-coa-and-rc-two-npm-packages-with-23m-weekly-downloads"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/package/rc"
},
{
"type": "WEB",
"url": "https://www.virustotal.com/gui/file/26451f7f6fe297adf6738295b1dcc70f7678434ef21d8b6aad5ec00beb8a72cf?nocache=1"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Embedded malware in rc"
}
Mitigation
Remove the malicious code and start an effort to ensure that no more malicious code exists. This may require a detailed review of all code, as it is possible to hide a serious attack in only one or two lines of code. These lines may be located almost anywhere in an application and may have been intentionally obfuscated by the attacker.
CAPEC-442: Infected Software
An adversary adds malicious logic, often in the form of a computer virus, to otherwise benign software. This logic is often hidden from the user of the software and works behind the scenes to achieve negative impacts. Many times, the malicious logic is inserted into empty space between legitimate code, and is then called when the software is executed. This pattern of attack focuses on software already fielded and used in operation as opposed to software that is still under development and part of the supply chain.
CAPEC-448: Embed Virus into DLL
An adversary tampers with a DLL and embeds a computer virus into gaps between legitimate machine instructions. These gaps may be the result of compiler optimizations that pad memory blocks for performance gains. The embedded virus then attempts to infect any machine which interfaces with the product, and possibly steal private data or eavesdrop.
CAPEC-636: Hiding Malicious Data or Code within Files
Files on various operating systems can have a complex format which allows for the storage of other data, in addition to its contents. Often this is metadata about the file, such as a cached thumbnail for an image file. Unless utilities are invoked in a particular way, this data is not visible during the normal use of the file. It is possible for an attacker to store malicious data or code using these facilities, which would be difficult to discover.