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-JH67-3WQW-CVHR
Vulnerability from github – Published: 2020-09-03 23:13 – Updated: 2021-10-01 14:35Version 0.8.0 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": "js-sxa3"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:54:06Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Version 0.8.0 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-jh67-3wqw-cvhr",
"modified": "2021-10-01T14:35:02Z",
"published": "2020-09-03T23:13:52Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1293"
}
],
"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 js-sxa3"
}
GHSA-JJHG-QW5V-R8XX
Vulnerability from github – Published: 2020-09-03 19:01 – Updated: 2021-09-30 20:06All versions of anarchy contain malicious code. The package ran rm - rf / as an install script.
Recommendation
Remove the package from your environment.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "anarchy"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:46:55Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `anarchy` contain malicious code. The package ran `rm - rf /` as an install script.\n\n\n## Recommendation\n\nRemove the package from your environment.",
"id": "GHSA-jjhg-qw5v-r8xx",
"modified": "2021-09-30T20:06:04Z",
"published": "2020-09-03T19:01:20Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1089"
}
],
"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 anarchy"
}
GHSA-JP27-CWP2-5QQR
Vulnerability from github – Published: 2018-07-23 20:54 – Updated: 2023-09-13 21:43The jquery.js package is a piece of malware that steals environment variables and sends them to attacker controlled locations.
All versions have been unpublished from the npm registry.
Recommendation
As this package is malware, if you find it installed in your environment, the real security concern is determining how it got there.
If you have found this installed in your environment, you should: 1. Delete the package 2. Clear your npm cache 3. Ensure it is not present in any other package.json files on your system 4. Regenerate your registry credentials, tokens, and any other sensitive credentials that may have been present in your environment variables.
Additionally, any service which may have been exposed via credentials in your environment variables, such as a database, should be reviewed for indicators of compromise as well.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "jquery.js"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.0.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2017-16045"
],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:43:53Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "The `jquery.js` package is a piece of malware that steals environment variables and sends them to attacker controlled locations. \n\nAll versions have been unpublished from the npm registry.\n\n\n## Recommendation\n\n\nAs this package is malware, if you find it installed in your environment, the real security concern is determining how it got there. \n\nIf you have found this installed in your environment, you should:\n1. Delete the package\n2. Clear your npm cache\n3. Ensure it is not present in any other package.json files on your system\n4. Regenerate your registry credentials, tokens, and any other sensitive credentials that may have been present in your environment variables. \n\nAdditionally, any service which may have been exposed via credentials in your environment variables, such as a database, should be reviewed for indicators of compromise as well.",
"id": "GHSA-jp27-cwp2-5qqr",
"modified": "2023-09-13T21:43:41Z",
"published": "2018-07-23T20:54:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16045"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-jp27-cwp2-5qqr"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/496"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "jquery.js is malware "
}
GHSA-JP9G-5X75-CCP8
Vulnerability from github – Published: 2020-09-02 21:34 – Updated: 2021-09-30 21:48Version 9.0.0 of colro-name contained malicious code as a preinstall script. The package downloaded a file from a remote server, executed it and opened a backdoor.
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": "colro-name"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:39:54Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Version 9.0.0 of `colro-name` contained malicious code as a preinstall script. The package downloaded a file from a remote server, executed it and opened a backdoor.\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-jp9g-5x75-ccp8",
"modified": "2021-09-30T21:48:24Z",
"published": "2020-09-02T21:34:30Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/902"
}
],
"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 colro-name"
}
GHSA-JPVJ-WPMJ-H7RV
Vulnerability from github – Published: 2026-06-04 19:37 – Updated: 2026-06-04 19:37Impact
On May 19, 2026, a compromised version of @cap-js/openapi@1.4.1 was published. The malicious packages harvested credentials and attempted self-propagation. If a compromised version was installed, all credentials accessible on that machine (npm tokens, cloud provider credentials, SSH keys, GitHub PATs) should be considered compromised.
Patches
Upgrade to @cap-js/openapi >= 1.4.2 If the compromised version was ever installed, rotate all affected credentials.
Workarounds
No workarounds.
References
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@cap-js/openapi"
},
"ranges": [
{
"events": [
{
"introduced": "1.4.1"
},
{
"fixed": "1.4.2"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.4.1"
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-04T19:37:04Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "### Impact\n\nOn May 19, 2026, a compromised version of @cap-js/openapi@1.4.1 was published.\nThe malicious packages harvested credentials and attempted self-propagation.\nIf a compromised version was installed, all credentials accessible on that machine (npm tokens, cloud provider credentials, SSH keys, GitHub PATs) should be considered compromised.\n\n### Patches\n\nUpgrade to @cap-js/openapi \u003e= 1.4.2\nIf the compromised version was ever installed, rotate all affected credentials.\n\n### Workarounds\nNo workarounds.\n\n### References\n\n- [SAP Note 3747787](https://me.sap.com/notes/3747787)\n- [Developer FAQ](https://www.sap.com/documents/2026/05/8203a8b9-4d7f-0010-bca6-c68f7e60039b.html)",
"id": "GHSA-jpvj-wpmj-h7rv",
"modified": "2026-06-04T19:37:04Z",
"published": "2026-06-04T19:37:04Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/cap-js/openapi/security/advisories/GHSA-jpvj-wpmj-h7rv"
},
{
"type": "PACKAGE",
"url": "https://github.com/cap-js/openapi"
},
{
"type": "WEB",
"url": "https://me.sap.com/notes/3747787"
},
{
"type": "WEB",
"url": "https://www.sap.com/documents/2026/05/8203a8b9-4d7f-0010-bca6-c68f7e60039b.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Supply chain compromise via malicious @cap-js/openapi"
}
GHSA-JQJG-V355-HR9Q
Vulnerability from github – Published: 2020-09-03 22:11 – Updated: 2021-09-29 21:12Version 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-xop"
},
"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:22Z",
"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-jqjg-v355-hr9q",
"modified": "2021-09-29T21:12:22Z",
"published": "2020-09-03T22:11:02Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1250"
}
],
"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-xop"
}
GHSA-JQVV-R4W3-8F7W
Vulnerability from github – Published: 2020-09-04 15:35 – Updated: 2021-10-01 20:38All 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": "bictoind-rpc"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:56:11Z",
"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-jqvv-r4w3-8f7w",
"modified": "2021-10-01T20:38:02Z",
"published": "2020-09-04T15:35:00Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1355"
}
],
"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 bictoind-rpc"
}
GHSA-JVFV-JHW9-JMPP
Vulnerability from github – Published: 2020-09-03 21:23 – Updated: 2021-09-29 20:22Version 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": "b5ffer-xor"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:51: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-jvfv-jhw9-jmpp",
"modified": "2021-09-29T20:22:21Z",
"published": "2020-09-03T21:23:09Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1228"
}
],
"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 b5ffer-xor"
}
GHSA-JWQ7-6J4R-2F92
Vulnerability from github – Published: 2025-09-11 14:22 – Updated: 2025-09-11 14:22Impact
NPM users of prebid 10.9.2. The malicious code attempts to redirect crypto transactions on the site to the attackers' wallet.
Patches
10.10.0 is solved
References
https://www.sonatype.com/blog/npm-chalk-and-debug-packages-hit-in-software-supply-chain-attack
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "prebid.js"
},
"ranges": [
{
"events": [
{
"introduced": "10.9.2"
},
{
"fixed": "10.10.0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"10.9.2"
]
}
],
"aliases": [
"CVE-2025-59038"
],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2025-09-11T14:22:40Z",
"nvd_published_at": "2025-09-09T23:15:37Z",
"severity": "HIGH"
},
"details": "### Impact\nNPM users of prebid 10.9.2. The malicious code attempts to redirect crypto transactions on the site to the attackers\u0027 wallet.\n\n### Patches\n10.10.0 is solved\n\n### References\nhttps://www.sonatype.com/blog/npm-chalk-and-debug-packages-hit-in-software-supply-chain-attack",
"id": "GHSA-jwq7-6j4r-2f92",
"modified": "2025-09-11T14:22:40Z",
"published": "2025-09-11T14:22:40Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/prebid/Prebid.js/security/advisories/GHSA-jwq7-6j4r-2f92"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-59038"
},
{
"type": "WEB",
"url": "https://github.com/prebid/Prebid.js/commit/72c7f184028f51ba15cdac744d56590b0f2b1f1e"
},
{
"type": "PACKAGE",
"url": "https://github.com/prebid/Prebid.js"
},
{
"type": "WEB",
"url": "https://github.com/prebid/Prebid.js/releases/tag/10.10.0"
},
{
"type": "WEB",
"url": "https://www.sonatype.com/blog/npm-chalk-and-debug-packages-hit-in-software-supply-chain-attack"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Prebid.js NPM package briefly compromised"
}
GHSA-JXF5-7X3J-8J9M
Vulnerability from github – Published: 2020-09-03 18:19 – Updated: 2021-09-30 20:05Version 3.0.2 of load-from-cwd-or-npm contains malicious code. The malware breaks functionality of the purescript-installer package by injecting targeted code.
Recommendation
Upgrade to version 3.0.4 or later. There is no indication of further compromise.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "load-from-cwd-or-npm"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.2"
},
{
"fixed": "3.0.4"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"3.0.2"
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:46:39Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Version 3.0.2 of `load-from-cwd-or-npm` contains malicious code. The malware breaks functionality of the `purescript-installer` package by injecting targeted code.\n\n\n## Recommendation\n\nUpgrade to version 3.0.4 or later. There is no indication of further compromise.",
"id": "GHSA-jxf5-7x3j-8j9m",
"modified": "2021-09-30T20:05:11Z",
"published": "2020-09-03T18:19:14Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1082"
}
],
"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 load-from-cwd-or-npm"
}
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.