CWE-506
Allowed-with-ReviewEmbedded Malicious Code
Abstraction: Class · Status: Incomplete
The product contains code that appears to be malicious in nature.
553 vulnerabilities reference this CWE, most recent first.
GHSA-9FG5-F5PJ-RWCC
Vulnerability from github – Published: 2018-11-09 17:43 – Updated: 2023-09-11 21:49The gruntcli 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": "gruntcli"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.0.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2017-16058"
],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:28:20Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "The `gruntcli` 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-9fg5-f5pj-rwcc",
"modified": "2023-09-11T21:49:09Z",
"published": "2018-11-09T17:43:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16058"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-9fg5-f5pj-rwcc"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/498"
}
],
"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": "gruntcli is malware"
}
GHSA-9G9J-RGGX-7FMG
Vulnerability from github – Published: 2025-09-15 21:22 – Updated: 2025-09-15 21:59Impact
On 8 September 2025, the npm publishing account for simple-swizzle was taken over after a phishing attack. Version 0.2.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, package 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": "simple-swizzle"
},
"ranges": [
{
"events": [
{
"introduced": "0.2.3"
},
{
"fixed": "0.2.4"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.2.3"
]
}
],
"aliases": [
"CVE-2025-59141"
],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2025-09-15T21:22:55Z",
"nvd_published_at": "2025-09-15T20:15:38Z",
"severity": "HIGH"
},
"details": "### Impact\nOn 8 September 2025, the npm publishing account for `simple-swizzle` was taken over after a phishing attack. Version `0.2.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, package 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-9g9j-rggx-7fmg",
"modified": "2025-09-15T21:59:00Z",
"published": "2025-09-15T21:22:55Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Qix-/node-simple-swizzle/security/advisories/GHSA-9g9j-rggx-7fmg"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-59141"
},
{
"type": "WEB",
"url": "https://github.com/debug-js/debug/issues/1005"
},
{
"type": "PACKAGE",
"url": "https://github.com/Qix-/node-simple-swizzle"
},
{
"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": "simple-swizzle@0.2.3 contains malware after npm account takeover"
}
GHSA-9HC2-W9GG-Q6JW
Vulnerability from github – Published: 2020-09-01 21:07 – Updated: 2021-10-01 13:28All versions of boogeyman are considered malicious. This particular package would download a payload from pastebin.com, eval it to read ssh keys and the users .npmrc and send them to a private pastebin account.
Recommendation
This package was published to the npm Registry for a very short period of time. If you happen to find it in your environment you should revoke and rotate your ssh keys and your npm token.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "boogeyman"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:32:24Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `boogeyman` are considered malicious. This particular package would download a payload from pastebin.com, eval it to read ssh keys and the users `.npmrc` and send them to a private pastebin account.\n\n\n## Recommendation\n\nThis package was published to the npm Registry for a very short period of time. If you happen to find it in your environment you should revoke and rotate your ssh keys and your npm token.",
"id": "GHSA-9hc2-w9gg-q6jw",
"modified": "2021-10-01T13:28:13Z",
"published": "2020-09-01T21:07:41Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/677"
}
],
"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 boogeyman"
}
GHSA-9MJP-GV34-3JCF
Vulnerability from github – Published: 2020-09-02 18:37 – Updated: 2021-10-01 13:55All versions of aasync 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": "aasync"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:37:53Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `aasync` 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-9mjp-gv34-3jcf",
"modified": "2021-10-01T13:55:21Z",
"published": "2020-09-02T18:37:35Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/844"
}
],
"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 aasync"
}
GHSA-9MMW-3FMH-96G3
Vulnerability from github – Published: 2020-09-02 20:23 – Updated: 2021-10-01 14:03All versions of calk 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": "calk"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:38:18Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `calk` 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-9mmw-3fmh-96g3",
"modified": "2021-10-01T14:03:32Z",
"published": "2020-09-02T20:23:38Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/855"
}
],
"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 calk"
}
GHSA-9PPG-JX86-FQW7
Vulnerability from github – Published: 2026-02-19 15:17 – Updated: 2026-09-04 07:15Description
On February 17, 2026 at 3:26 AM PT, an unauthorized party used a compromised npm publish token to publish an update to Cline CLI on the NPM registry: cline@2.3.0. The published package contains a modified package.json with an added postinstall script:
"postinstall": "npm install -g openclaw@latest"
This causes openclaw (an unrelated, non-malicious open source package) to be globally installed when cline@2.3.0 is installed. No other files were modified -- the CLI binary (dist/cli.mjs) and all other package contents are identical to the legitimate cline@2.2.3 release.
A corrected version (2.4.0) was published at 11:23 AM PT and 2.3.0 was deprecated at 11:30 AM PT. The compromised token has been revoked and npm publishing now uses OIDC provenance via GitHub Actions.
Impact
Users who installed Cline CLI cline@2.3.0 during the approximately 8-hour window between 3:26 AM PT and 11:30 AM PT on February 17 will have openclaw globally installed. The openclaw package is a legitimate open source project and is not malicious, but its installation was not authorized or intended.
The Cline VS Code extension and JetBrains plugin were not affected. This advisory applies only to the Cline CLI package published on npm.
Patches
Versions 2.4.0 and higher are fixed
Workarounds
If you installed Cline CLI cline@2.3.0:
1. Update to the latest version of the Cline CLI
cline update or npm installl -g cline@latest
2. Verify that you have a fixed version (2.4.0 or higher)
cline --version
3. Review your environment for any unexpected installation of OpenClaw and remove it if not intended
npm uninstall -g openclaw
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "cline"
},
"ranges": [
{
"events": [
{
"introduced": "2.3.0"
},
{
"fixed": "2.4.0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.3.0"
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-19T15:17:10Z",
"nvd_published_at": null,
"severity": "LOW"
},
"details": "### Description\nOn February 17, 2026 at 3:26 AM PT, an unauthorized party used a compromised npm publish token to publish an update to Cline CLI on the NPM registry: cline@2.3.0. The published package contains a modified package.json with an added postinstall script:\n`\"postinstall\": \"npm install -g openclaw@latest\"`\nThis causes openclaw (an unrelated, non-malicious open source package) to be globally installed when cline@2.3.0 is installed. No other files were modified -- the CLI binary (dist/cli.mjs) and all other package contents are identical to the legitimate cline@2.2.3 release.\nA corrected version (2.4.0) was published at 11:23 AM PT and 2.3.0 was deprecated at 11:30 AM PT. The compromised token has been revoked and npm publishing now uses OIDC provenance via GitHub Actions.\n\n### Impact\nUsers who installed Cline CLI cline@2.3.0 during the approximately 8-hour window between 3:26 AM PT and 11:30 AM PT on February 17 will have openclaw globally installed. The openclaw package is a legitimate open source project and is not malicious, but its installation was not authorized or intended.\n\nThe Cline VS Code extension and JetBrains plugin were not affected. This advisory applies only to the Cline CLI package published on npm.\n\n### Patches\nVersions 2.4.0 and higher are fixed\n\n### Workarounds\nIf you installed Cline CLI cline@2.3.0:\n1. Update to the latest version of the Cline CLI\n`cline update` or `npm installl -g cline@latest`\n2. Verify that you have a fixed version (2.4.0 or higher)\n`cline --version`\n3. Review your environment for any unexpected installation of OpenClaw and remove it if not intended\n`npm uninstall -g openclaw`",
"id": "GHSA-9ppg-jx86-fqw7",
"modified": "2026-09-04T07:15:20Z",
"published": "2026-02-19T15:17:10Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/cline/cline/security/advisories/GHSA-9ppg-jx86-fqw7"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-9ppg-jx86-fqw7"
},
{
"type": "PACKAGE",
"url": "https://github.com/cline/cline"
},
{
"type": "WEB",
"url": "https://github.com/ossf/malicious-packages/blob/4012598c9b06e58935bd8883f7a0cd37c3130664/osv/malicious/npm/cline/MAL-2026-1380.json"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Unauthorized npm publish of cline@2.3.0 with modified postinstall script"
}
GHSA-9PPR-X3MG-6JG2
Vulnerability from github – Published: 2026-09-22 21:31 – Updated: 2026-09-23 18:31Crypt::SelfCertificate versions from 1.01 through 1.05 for Perl contains malware which executes Python code from an obfuscated URL.
The generate_certificate runs a Python script saved as a certificate file. The pyhton script attempts to retrieve code from a hardcoded http URL that is obfuscated with base64 encoding and run the response body directly.
The impact is that arbitrary code can be invoked as the user, without a dropped script being saved on the affected host.
The releases have no test scripts nor build hooks. The intention may have been to trigger the payload after installation.
For version 1.01, the dropper script is in lib/Crypt/SelfCertificate/sample/validate.p12.
For version 1.05, the dropper script is in lib/Crypt/SelfCertificate/sample/cert7.pem.
The SHA-256 digests of the files are
fbff21f45ff748365062a5e36fb2d72558cad82a507a6f357f320b4fcdf07760 Crypt-SelfCertificate-1.01.tar.gz
27b2d2d3174ad771474fff2521f5084ec231e9218ea8c832515aef1cbd5897bc lib/Crypt/SelfCertificate/sample/validate.p12
9fdfa7d69b034b77d4510cda567e8da1e486ca81c7daaadc5732a45c41d71991 Crypt-SelfCertificate-1.05.tar.gz
27b2d2d3174ad771474fff2521f5084ec231e9218ea8c832515aef1cbd5897bc lib/Crypt/SelfCertificate/sample/cert7.pem
{
"affected": [],
"aliases": [
"CVE-2026-95831"
],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-22T19:17:00Z",
"severity": "HIGH"
},
"details": "Crypt::SelfCertificate versions from 1.01 through 1.05 for Perl contains malware which executes Python code from an obfuscated URL.\n\nThe generate_certificate runs a Python script saved as a certificate file. The pyhton script attempts to retrieve code from a hardcoded http URL that is obfuscated with base64 encoding and run the response body directly.\n\nThe impact is that arbitrary code can be invoked as the user, without a dropped script being saved on the affected host.\n\nThe releases have no test scripts nor build hooks. The intention may have been to trigger the payload after installation.\n\nFor version 1.01, the dropper script is in lib/Crypt/SelfCertificate/sample/validate.p12.\n\nFor version 1.05, the dropper script is in lib/Crypt/SelfCertificate/sample/cert7.pem.\n\nThe SHA-256 digests of the files are\n\n fbff21f45ff748365062a5e36fb2d72558cad82a507a6f357f320b4fcdf07760 Crypt-SelfCertificate-1.01.tar.gz\n 27b2d2d3174ad771474fff2521f5084ec231e9218ea8c832515aef1cbd5897bc lib/Crypt/SelfCertificate/sample/validate.p12\n\n 9fdfa7d69b034b77d4510cda567e8da1e486ca81c7daaadc5732a45c41d71991 Crypt-SelfCertificate-1.05.tar.gz\n 27b2d2d3174ad771474fff2521f5084ec231e9218ea8c832515aef1cbd5897bc lib/Crypt/SelfCertificate/sample/cert7.pem",
"id": "GHSA-9ppr-x3mg-6jg2",
"modified": "2026-09-23T18:31:40Z",
"published": "2026-09-22T21:31:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-95831"
},
{
"type": "WEB",
"url": "https://www.nntp.perl.org/group/perl.cpan.testers.discuss/2026/09/msg4754.html"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2026/09/22/21"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2026/09/23/2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2026/09/23/3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-9Q9M-M2F6-JR5Q
Vulnerability from github – Published: 2020-09-02 20:22 – Updated: 2021-10-01 14:03All versions of chak 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": "chak"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:38:16Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `chak` 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-9q9m-m2f6-jr5q",
"modified": "2021-10-01T14:03:17Z",
"published": "2020-09-02T20:22:34Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/854"
}
],
"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 chak"
}
GHSA-9RWJ-8MH9-4876
Vulnerability from github – Published: 2020-09-02 21:19 – Updated: 2021-09-30 21:23All versions of carloprojectdiscord 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": "carloprojectdiscord"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:39:01Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of `carloprojectdiscord` 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-9rwj-8mh9-4876",
"modified": "2021-09-30T21:23:53Z",
"published": "2020-09-02T21:19:37Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/874"
}
],
"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 carloprojectdiscord"
}
GHSA-9X64-5R7X-2Q53
Vulnerability from github – Published: 2020-09-01 21:21 – Updated: 2021-10-01 13:30Version 0.1.1 of flatmap-stream is considered malicious.
This module runs an encrypted payload targeting a very specific application, copay and because they shared the same description it would have likely worked for copay-dash.
The injected code:
- Read in AES encrypted data from a file disguised as a test fixture
- Grabbed the npm package description of the module that imported it, using an automatically set environment variable
- Used the package description as a key to decrypt a chunk of data pulled in from the disguised file
The decrypted data was part of a module, which was then compiled in memory and executed.
This module performed the following actions:
- Decrypted another chunk of data from the disguised file
- Concatenated a small, commented prefix from the first decrypted chunk to the end of the second decrypted chunk
- Performed minor decoding tasks to transform the concatenated block of code from invalid JS to valid JS (we believe this was done to evade detection by dynamic analysis tools)
- Wrote this processed block of JS out to a file stored in a dependency that would be packaged by the build scripts:
The chunk of code that was written out was the actual malicious code, intended to be run on devices owned by the end users of Copay.
This code would do the following:
- Detect the current environment: Mobile/Cordova/Electron
- Check the Bitcoin and Bitcoin Cash balances on the victim's copay account
- If the current balance was greater than 100 Bitcoin, or 1000 Bitcoin Cash:
- Harvest the victim's account data in full
- Harvest the victim's copay private keys
- Send the victim's account data/private keys off to a collection
Recommendation
If you find this module in your environment it's best to remove it. The malicious version of event-stream and flatmap-stream have been removed from the npm Registry.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "flatmap-stream"
},
"versions": [
"0.1.1"
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:33:59Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Version 0.1.1 of `flatmap-stream` is considered malicious.\n\nThis module runs an encrypted payload targeting a very specific application, `copay` and because they shared the same description it would have likely worked for `copay-dash`.\n\nThe injected code:\n\n- Read in AES encrypted data from a file disguised as a test fixture\n- Grabbed the npm package description of the module that imported it, using an automatically set environment variable\n- Used the package description as a key to decrypt a chunk of data pulled in from the disguised file\n\nThe decrypted data was part of a module, which was then compiled in memory and executed.\n\nThis module performed the following actions:\n\n- Decrypted another chunk of data from the disguised file\n- Concatenated a small, commented prefix from the first decrypted chunk to the end of the second decrypted chunk\n- Performed minor decoding tasks to transform the concatenated block of code from invalid JS to valid JS (we believe this was done to evade detection by dynamic analysis tools)\n- Wrote this processed block of JS out to a file stored in a dependency that would be packaged by the build scripts: \n\nThe chunk of code that was written out was the actual malicious code, intended to be run on devices owned by the end users of Copay.\n\nThis code would do the following:\n\n- Detect the current environment: Mobile/Cordova/Electron\n- Check the Bitcoin and Bitcoin Cash balances on the victim\u0027s copay account\n- If the current balance was greater than 100 Bitcoin, or 1000 Bitcoin Cash:\n - Harvest the victim\u0027s account data in full\n - Harvest the victim\u0027s copay private keys\n - Send the victim\u0027s account data/private keys off to a collection\n\n\n## Recommendation\n\nIf you find this module in your environment it\u0027s best to remove it. The malicious version of event-stream and flatmap-stream have been removed from the npm Registry.",
"id": "GHSA-9x64-5r7x-2q53",
"modified": "2021-10-01T13:30:04Z",
"published": "2020-09-01T21:21:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/dominictarr/event-stream/issues/116"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/737"
}
],
"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 flatmap-stream"
}
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.