CWE-506
Allowed-with-ReviewEmbedded Malicious Code
Abstraction: Class · Status: Incomplete
The product contains code that appears to be malicious in nature.
548 vulnerabilities reference this CWE, most recent first.
GHSA-725F-3PW7-RQ6X
Vulnerability from github – Published: 2020-09-03 21:09 – Updated: 2021-09-29 20:46Versions 1.0.2, 1.0.3, 1.0.4 and 1.0.5 of 8.9.4 contain malicious code as a preinstall script. The package reads the system's SSH keys but does not upload it to a remote server.
Recommendation
Remove the package from your environment. There is no evidence of further compromise at the moment.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "8.9.4"
},
"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:57Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Versions 1.0.2, 1.0.3, 1.0.4 and 1.0.5 of `8.9.4` contain malicious code as a preinstall script. The package reads the system\u0027s SSH keys but does not upload it to a remote server.\n\n\n## Recommendation\n\nRemove the package from your environment. There is no evidence of further compromise at the moment.",
"id": "GHSA-725f-3pw7-rq6x",
"modified": "2021-09-29T20:46:52Z",
"published": "2020-09-03T21:09:47Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1201"
}
],
"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 8.9.4"
}
GHSA-72HV-RP4Q-Q7F3
Vulnerability from github – Published: 2018-08-29 23:57 – Updated: 2023-09-11 18:38The babelcli 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": "babelcli"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2017-16060"
],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:20:55Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "The `babelcli` 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\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-72hv-rp4q-q7f3",
"modified": "2023-09-11T18:38:16Z",
"published": "2018-08-29T23:57:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16060"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-72hv-rp4q-q7f3"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/499"
}
],
"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": "babelcli is malware"
}
GHSA-73C6-VWJH-G3QH
Vulnerability from github – Published: 2020-09-03 19:40 – 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": "crpyto-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:57:32Z",
"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-73c6-vwjh-g3qh",
"modified": "2021-10-01T21:00:05Z",
"published": "2020-09-03T19:40:46Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1390"
}
],
"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 crpyto-js"
}
GHSA-73HR-6785-F5P8
Vulnerability from github – Published: 2020-09-02 21:24 – Updated: 2021-09-30 21:24The package donotinstallthis contained malicious code. The package contained a script that was run as part of the install script. The script contacted a remote service tracking how many installations were done. There is no further compromise.
Recommendation
Remove the package from your environment.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "donotinstallthis"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:39:25Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "The package `donotinstallthis` contained malicious code. The package contained a script that was run as part of the install script. The script contacted a remote service tracking how many installations were done. There is no further compromise.\n\n\n## Recommendation\n\nRemove the package from your environment.",
"id": "GHSA-73hr-6785-f5p8",
"modified": "2021-09-30T21:24:59Z",
"published": "2020-09-02T21:24:55Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/887"
}
],
"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 donotinstallthis"
}
GHSA-73QR-PFMQ-6RP8
Vulnerability from github – Published: 2021-11-04 16:22 – Updated: 2022-09-07 22:16The npm package coa had versions published with malicious code. Users of affected versions (2.0.3 and above) should downgrade to 2.0.2 as soon as possible and check their systems for suspicious activity. See this issue for details as they unfold.
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": "coa"
},
"versions": [
"2.0.3"
]
},
{
"package": {
"ecosystem": "npm",
"name": "coa"
},
"versions": [
"2.0.4"
]
},
{
"package": {
"ecosystem": "npm",
"name": "coa"
},
"versions": [
"2.1.1"
]
},
{
"package": {
"ecosystem": "npm",
"name": "coa"
},
"versions": [
"2.1.3"
]
},
{
"package": {
"ecosystem": "npm",
"name": "coa"
},
"versions": [
"3.0.1"
]
},
{
"package": {
"ecosystem": "npm",
"name": "coa"
},
"versions": [
"3.1.3"
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2021-11-04T16:19:49Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "The npm package\u00a0`coa`\u00a0had versions published with malicious code. Users of affected versions (2.0.3 and above) should downgrade to 2.0.2 as soon as possible and check their systems for suspicious activity. See\u00a0[this issue](https://github.com/veged/coa/issues/99)\u00a0for details as they unfold.\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-73qr-pfmq-6rp8",
"modified": "2022-09-07T22:16:29Z",
"published": "2021-11-04T16:22:28Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/veged/coa/issues/99"
},
{
"type": "PACKAGE",
"url": "https://github.com/veged/coa"
},
{
"type": "WEB",
"url": "https://therecord.media/malware-found-in-coa-and-rc-two-npm-packages-with-23m-weekly-downloads"
},
{
"type": "WEB",
"url": "https://www.virustotal.com/gui/file/26451f7f6fe297adf6738295b1dcc70f7678434ef21d8b6aad5ec00beb8a72cf?nocache=1"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Embedded malware in coa"
}
GHSA-73WV-V82C-XMQV
Vulnerability from github – Published: 2020-09-03 21:50 – Updated: 2021-09-29 20:58Version 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": "buffep-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:59Z",
"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-73wv-v82c-xmqv",
"modified": "2021-09-29T20:58:02Z",
"published": "2020-09-03T21:50:51Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1240"
}
],
"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 buffep-xor"
}
GHSA-74HH-4RCV-PP27
Vulnerability from github – Published: 2020-09-04 16:44 – Updated: 2021-10-01 20:43All 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": "bitconijs-lib"
},
"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:46Z",
"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-74hh-4rcv-pp27",
"modified": "2021-10-01T20:43:53Z",
"published": "2020-09-04T16:44:19Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1370"
}
],
"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 bitconijs-lib"
}
GHSA-762C-V946-PF25
Vulnerability from github – Published: 2020-09-04 16:47 – Updated: 2021-10-01 20:44All 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": "bpi39"
},
"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:53Z",
"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-762c-v946-pf25",
"modified": "2021-10-01T20:44:46Z",
"published": "2020-09-04T16:47:33Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1373"
}
],
"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 bpi39"
}
GHSA-766V-7GJX-55HF
Vulnerability from github – Published: 2020-09-03 23:08 – Updated: 2021-09-30 17:14Version 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-shq3"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:53:56Z",
"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-766v-7gjx-55hf",
"modified": "2021-09-30T17:14:27Z",
"published": "2020-09-03T23:08:34Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1289"
}
],
"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-shq3"
}
GHSA-7696-QR5Q-PG37
Vulnerability from github – Published: 2020-09-03 23:19 – Updated: 2021-10-01 16:10Version 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": "zs-sha3"
},
"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:19Z",
"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-7696-qr5q-pg37",
"modified": "2021-10-01T16:10:59Z",
"published": "2020-09-03T23:19:08Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1299"
}
],
"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 zs-sha3"
}
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.