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-8GV6-G7VP-HR34
Vulnerability from github – Published: 2020-09-01 18:58 – Updated: 2023-09-12 18:51The mysqljs 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": "mysqljs"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2017-16047"
],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:25:17Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "The `mysqljs` 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\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-8gv6-g7vp-hr34",
"modified": "2023-09-12T18:51:19Z",
"published": "2020-09-01T18:58:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16047"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/494"
}
],
"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": "mysqljs is malware"
}
GHSA-8HMR-W35F-3QGJ
Vulnerability from github – Published: 2020-09-03 21:07 – Updated: 2021-09-29 20:46Version 0.0.1 of harmlesspackage contains malicious code as a postinstall script. The package printed a message to the console and performed a GET request to a remote server.
Recommendation
Remove the package from your environment. There is no evidence of further compromise.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "harmlesspackage"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:50:52Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Version 0.0.1 of `harmlesspackage` contains malicious code as a postinstall script. The package printed a message to the console and performed a GET request to a remote server.\n\n\n## Recommendation\n\nRemove the package from your environment. There is no evidence of further compromise.",
"id": "GHSA-8hmr-w35f-3qgj",
"modified": "2021-09-29T20:46:19Z",
"published": "2020-09-03T21:07:37Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1199"
}
],
"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 harmlesspackage"
}
GHSA-8HQ2-FCQM-39HQ
Vulnerability from github – Published: 2020-09-02 21:46 – Updated: 2021-09-30 21:57Version 1.0.0 of rimrafall contains malicious code as a preinstall script. The package attempts to remove all files in the system's root folder.
Recommendation
If you installed this package it is likely your machine was erased. If not, remove the package from your system and verify if any files were deleted.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "rimrafall"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:40:20Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Version 1.0.0 of `rimrafall` contains malicious code as a preinstall script. The package attempts to remove all files in the system\u0027s root folder.\n\n\n## Recommendation\n\nIf you installed this package it is likely your machine was erased. If not, remove the package from your system and verify if any files were deleted.",
"id": "GHSA-8hq2-fcqm-39hq",
"modified": "2021-09-30T21:57:22Z",
"published": "2020-09-02T21:46:05Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/913"
}
],
"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 rimrafall"
}
GHSA-8HQW-QP6R-VQCM
Vulnerability from github – Published: 2020-09-04 16:40 – Updated: 2021-10-01 20:42All 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": "bitcoin-sweep"
},
"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: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-8hqw-qp6r-vqcm",
"modified": "2021-10-01T20:42:42Z",
"published": "2020-09-04T16:40:00Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1366"
}
],
"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 bitcoin-sweep"
}
GHSA-8HRQ-9WM7-V3JW
Vulnerability from github – Published: 2020-09-03 21:39 – Updated: 2021-09-29 20:53Version 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": "btffer-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:39Z",
"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-8hrq-9wm7-v3jw",
"modified": "2021-09-29T20:53:26Z",
"published": "2020-09-03T21:39:41Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1231"
}
],
"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 btffer-xor"
}
GHSA-8J7X-PR59-M5H8
Vulnerability from github – Published: 2020-09-02 21:31 – Updated: 2021-09-30 21:37All versions of whiteproject contain obfuscated malware that uploads Discord user tokens to a remote server. This allows attackers to make purchases on behalf of users if they have credit cards linked to their Discord accounts.
Recommendation
Remove the package from your environment. Review your Discord account access and rotate tokens if possible. If a credit card was linked to a compromised account contact your credit card company.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "whiteproject"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:39:48Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `whiteproject` contain obfuscated malware that uploads Discord user tokens to a remote server. This allows attackers to make purchases on behalf of users if they have credit cards linked to their Discord accounts.\n\n\n## Recommendation\n\nRemove the package from your environment. Review your Discord account access and rotate tokens if possible. If a credit card was linked to a compromised account contact your credit card company.",
"id": "GHSA-8j7x-pr59-m5h8",
"modified": "2021-09-30T21:37:21Z",
"published": "2020-09-02T21:31:18Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/898"
}
],
"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 whiteproject"
}
GHSA-8JF2-CQ6V-W234
Vulnerability from github – Published: 2020-09-03 21:10 – Updated: 2021-09-29 20:47Version 0.17.3 of uglyfi.js contains malicious code as a preinstall script. The package is malware designed to take advantage of users making a mistake when typing the name of a module to install. When installed, the package downloads a file from a remote server, executes it and opens 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": "uglyfi.js"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:50:59Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Version 0.17.3 of `uglyfi.js` contains malicious code as a preinstall script. The package is malware designed to take advantage of users making a mistake when typing the name of a module to install. When installed, the package downloads a file from a remote server, executes it and opens 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-8jf2-cq6v-w234",
"modified": "2021-09-29T20:47:08Z",
"published": "2020-09-03T21:10:53Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1202"
}
],
"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 uglyfi.js"
}
GHSA-8M5V-F2WP-WQR9
Vulnerability from github – Published: 2020-09-03 17:30 – Updated: 2021-09-30 17:50All versions of ali-contributors contain malicious code. The package uploads system information to a remote server, downloads a file and executes it.
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": "ali-contributors"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:45:20Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `ali-contributors` contain malicious code. The package uploads system information to a remote server, downloads a file and executes it.\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-8m5v-f2wp-wqr9",
"modified": "2021-09-30T17:50:11Z",
"published": "2020-09-03T17:30:36Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1046"
}
],
"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 ali-contributors"
}
GHSA-8MJQ-32X3-22QF
Vulnerability from github – Published: 2025-09-25 00:30 – Updated: 2025-09-25 16:34Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-cxm3-wv7p-598c. This link is maintained to preserve external references.
Original Description
Malicious code was inserted into the Nx (build system) package and several related plugins. The tampered package was published to the npm software registry, via a supply-chain attack. Affected versions contain code that scans the file system, collects credentials, and posts them to GitHub as a repo under user's accounts.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "nx"
},
"versions": [
"21.5.0"
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2025-09-25T16:34:25Z",
"nvd_published_at": "2025-09-24T22:15:35Z",
"severity": "CRITICAL"
},
"details": "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-cxm3-wv7p-598c. This link is maintained to preserve external references.\n\n## Original Description\n\nMalicious code was inserted into the Nx (build system) package and several related plugins. The tampered package was published to the npm software registry, via a supply-chain attack. Affected versions contain code that scans the file system, collects credentials, and posts them to GitHub as a repo under user\u0027s accounts.",
"id": "GHSA-8mjq-32x3-22qf",
"modified": "2025-09-25T16:34:25Z",
"published": "2025-09-25T00:30:27Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nrwl/nx/security/advisories/GHSA-cxm3-wv7p-598c"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-10894"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2025-10894"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/supply-chain-attacks-NPM-packages"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2396282"
},
{
"type": "WEB",
"url": "https://www.stepsecurity.io/blog/supply-chain-security-alert-popular-nx-build-system-package-compromised-with-data-stealing-malware"
},
{
"type": "WEB",
"url": "https://www.wiz.io/blog/s1ngularity-supply-chain-attack"
}
],
"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": "Duplicate Advisory: Malicious versions of Nx were published",
"withdrawn": "2025-09-25T16:34:25Z"
}
GHSA-8MM3-2MCJ-CX6R
Vulnerability from github – Published: 2020-09-11 21:09 – Updated: 2021-09-30 21:57Version 0.0.3 of angluar-cli contains malicious code as a postinstall script. The package is malware designed to take advantage of users making a mistake when typing the name of a module to install. When installed the package attempts to remove files and stop processes related to McAfee antivirus on macOS.
Recommendation
Remove the package from your environment and verify whether files were deleted and if processes were stopped.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "angluar-cli"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:40:31Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Version 0.0.3 of `angluar-cli` contains malicious code as a postinstall script. The package is malware designed to take advantage of users making a mistake when typing the name of a module to install. When installed the package attempts to remove files and stop processes related to McAfee antivirus on macOS.\n\n\n## Recommendation\n\nRemove the package from your environment and verify whether files were deleted and if processes were stopped.",
"id": "GHSA-8mm3-2mcj-cx6r",
"modified": "2021-09-30T21:57:57Z",
"published": "2020-09-11T21:09:24Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/918"
}
],
"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 angluar-cli"
}
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.