Common Weakness Enumeration

CWE-506

Allowed-with-Review

Embedded 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-QCC9-Q247-3M2M

Vulnerability from github – Published: 2020-09-03 19:46 – Updated: 2021-09-30 20:17
VLAI
Summary
Malicious Package in js-regular
Details

This package contained malicious code. The package uploaded system information such as OS and hostname to a remote server.

Recommendation

Remove the package from your environment. There are no indications of further compromise.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "js-regular"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-08-31T18:48:18Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "This package contained malicious code. The package uploaded system information such as OS and hostname to a remote server.\n\n\n## Recommendation\n\nRemove the package from your environment. There are no indications of further compromise.",
  "id": "GHSA-qcc9-q247-3m2m",
  "modified": "2021-09-30T20:17:10Z",
  "published": "2020-09-03T19:46:49Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1129"
    }
  ],
  "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-regular"
}

GHSA-QFC9-X7GV-27JR

Vulnerability from github – Published: 2020-09-03 18:12 – Updated: 2021-09-30 20:03
VLAI
Summary
Malicious Package in deasyncp
Details

All versions of deasyncp contain malicious code. The package shuts down the machine upon installation as a preinstall script.

Recommendation

Remove the package from your environment. There is no further compromise.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "deasyncp"
      },
      "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:20Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "All versions of `deasyncp ` contain malicious code. The package shuts down the machine upon installation as a preinstall script.\n\n\n## Recommendation\n\nRemove the package from your environment. There is no further compromise.",
  "id": "GHSA-qfc9-x7gv-27jr",
  "modified": "2021-09-30T20:03:51Z",
  "published": "2020-09-03T18:12:36Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1073"
    }
  ],
  "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 deasyncp"
}

GHSA-QJ2G-642F-4JRV

Vulnerability from github – Published: 2020-09-02 21:17 – Updated: 2021-09-30 21:15
VLAI
Summary
Malicious Package in carloprojectlesang
Details

All versions of carloprojectlesang 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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "carloprojectlesang"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-08-31T18:38:57Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "All versions of `carloprojectlesang` 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-qj2g-642f-4jrv",
  "modified": "2021-09-30T21:15:22Z",
  "published": "2020-09-02T21:17:30Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/872"
    }
  ],
  "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 carloprojectlesang"
}

GHSA-QJ3G-WFR7-3CV7

Vulnerability from github – Published: 2020-09-02 21:41 – Updated: 2021-09-30 21:56
VLAI
Summary
Malicious Package in require-ports
Details

Version 10.4.0 of require-ports 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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "require-ports"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-08-31T18:40:11Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "Version 10.4.0 of `require-ports` 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-qj3g-wfr7-3cv7",
  "modified": "2021-09-30T21:56:11Z",
  "published": "2020-09-02T21:41:53Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/909"
    }
  ],
  "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 require-ports"
}

GHSA-QJ3P-XC97-XW74

Vulnerability from github – Published: 2025-09-15 13:55 – Updated: 2025-09-15 13:55
VLAI
Summary
MetaMask SDK indirectly exposed via malicious debug@4.4.2 dependency
Details

Who is affected?

This advisory only applies to developers who use MetaMask SDK in the browser and who, on Sept 8th 2025 between 13:00–15:30 UTC, performed one of the following actions and then deployed their application: - Installed MetaMask SDK into a project with a lockfile for the first time - Installed MetaMask SDK in a project without a lockfile - Updated a lockfile to pull in debug@4.4.2 (e.g., via npm update or yarn upgrade)

What happened?

On Sept 8th, 2025 (13:00–15:30 UTC), a malicious version of the debug package (v4.4.2) was published to npm. The injected code attempts to interfere with dApp-to-wallet communication when executed in a browser context.

While MetaMask SDK itself was not directly impacted, projects installing the SDK during this window may have inadvertently pulled in the malicious version of debug.

Mitigation

  • If your application was rebuilt and redeployed after Sept 8th, 2025, 15:30 UTC, the malicious version of debug should no longer be present. Please also verify that your package manager (npm, yarn, pnpm, etc.) is not caching debug@4.4.2.
  • If you have not yet deployed since performing one of the actions above, delete your node_modules and reinstall dependencies before deploying.
  • If your application was deployed during the attack window and has not been rebuilt since, perform a clean install of dependencies and redeploy to ensure the malicious package is removed.

Resources

GitHub Advisory for debug

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.33.0"
      },
      "package": {
        "ecosystem": "npm",
        "name": "@metamask/sdk"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.16.0"
            },
            {
              "fixed": "0.33.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.33.0"
      },
      "package": {
        "ecosystem": "npm",
        "name": "@metamask/sdk-react"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.16.0"
            },
            {
              "fixed": "0.33.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.33.0"
      },
      "package": {
        "ecosystem": "npm",
        "name": "@metamask/sdk-communication-layer"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.16.0"
            },
            {
              "fixed": "0.33.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-09-15T13:55:56Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "### Who is affected?\nThis advisory only applies to developers who use MetaMask SDK in the browser and who, on Sept 8th 2025 between 13:00\u201315:30 UTC, performed one of the following actions and then deployed their application:\n- Installed MetaMask SDK into a project with a lockfile for the first time\n- Installed MetaMask SDK in a project without a lockfile\n- Updated a lockfile to pull in `debug@4.4.2` (e.g., via `npm update` or `yarn upgrade`)\n\n### What happened?\nOn Sept 8th, 2025 (13:00\u201315:30 UTC), a malicious version of the `debug` package (v4.4.2) was published to npm. The injected code attempts to interfere with dApp-to-wallet communication when executed in a browser context. \n\nWhile MetaMask SDK itself was not directly impacted, projects installing the SDK during this window may have inadvertently pulled in the malicious version of `debug`.\n\n### Mitigation\n- If your application was rebuilt and redeployed after Sept 8th, 2025, 15:30 UTC, the malicious version of debug should no longer be present. Please also verify that your package manager (npm, yarn, pnpm, etc.) is not caching `debug@4.4.2`.\n- If you have not yet deployed since performing one of the actions above, delete your `node_modules` and reinstall dependencies before deploying.\n- If your application was deployed during the attack window and has not been rebuilt since, perform a clean install of dependencies and redeploy to ensure the malicious package is removed.\n\n### Resources\n[GitHub Advisory for debug](https://github.com/advisories/GHSA-8mgj-vmr8-frr6)",
  "id": "GHSA-qj3p-xc97-xw74",
  "modified": "2025-09-15T13:55:56Z",
  "published": "2025-09-15T13:55:56Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/MetaMask/metamask-sdk/security/advisories/GHSA-qj3p-xc97-xw74"
    },
    {
      "type": "WEB",
      "url": "https://github.com/MetaMask/metamask-sdk/pull/1342"
    },
    {
      "type": "WEB",
      "url": "https://github.com/MetaMask/metamask-sdk/commit/baa185c6cfa97755a3d389d956372ad9eb37c4a4"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/MetaMask/metamask-sdk"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "MetaMask SDK indirectly exposed via malicious debug@4.4.2 dependency"
}

GHSA-QJ73-V688-WQXF

Vulnerability from github – Published: 2018-08-29 23:19 – Updated: 2020-08-31 18:26
VLAI
Summary
Hijacked Environment Variables in proxy.js
Details

The proxy.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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "proxy.js"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "1.0.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2017-16076"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:52:09Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "The `proxy.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-qj73-v688-wqxf",
  "modified": "2020-08-31T18:26:04Z",
  "published": "2018-08-29T23:19:13Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16076"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-qj73-v688-wqxf"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/515"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "Hijacked Environment Variables in proxy.js"
}

GHSA-QM4Q-F956-FG64

Vulnerability from github – Published: 2020-09-03 17:39 – Updated: 2021-09-30 19:50
VLAI
Summary
Malicious Package in luna-mock
Details

All versions of luna-mock 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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "luna-mock"
      },
      "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:40Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "All versions of `luna-mock` 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-qm4q-f956-fg64",
  "modified": "2021-09-30T19:50:00Z",
  "published": "2020-09-03T17:39:13Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1055"
    }
  ],
  "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 luna-mock"
}

GHSA-QMG3-HPQR-GQVC

Vulnerability from github – Published: 2025-03-19 15:19 – Updated: 2025-10-22 19:29
VLAI
Summary
Multiple Reviewdog actions were compromised during a specific time period
Details

Summary

reviewdog/action-setup@v1 was compromised March 11, 2025, between 18:42 and 20:31 UTC, with malicious code added that dumps exposed secrets to Github Actions Workflow Logs.

Other reviewdog actions that use reviewdog/action-setup@v1 would also be compromised, regardless of version or pinning method: - reviewdog/action-shellcheck - reviewdog/action-composite-template - reviewdog/action-staticcheck - reviewdog/action-ast-grep - reviewdog/action-typos

Details

Malicious commit: https://github.com/reviewdog/action-setup/commit/f0d342d fix/retag via version upgrade: https://github.com/reviewdog/action-setup/commit/3f401fe

See the detailed report from Wiz Research: Wiz Blog Post and reviewdog maintainer annoucement: reviewdog #2079

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "GitHub Actions",
        "name": "reviewdog/action-setup"
      },
      "versions": [
        "1"
      ]
    }
  ],
  "aliases": [
    "CVE-2025-30154"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-03-19T15:19:12Z",
    "nvd_published_at": "2025-03-19T16:15:33Z",
    "severity": "HIGH"
  },
  "details": "### Summary\n\n`reviewdog/action-setup@v1` was compromised March 11, 2025, between 18:42 and 20:31 UTC, with malicious code added that dumps exposed secrets to Github Actions Workflow Logs.\n\nOther reviewdog actions that use `reviewdog/action-setup@v1` would also be compromised, regardless of version or pinning method:\n- reviewdog/action-shellcheck\n- reviewdog/action-composite-template\n- reviewdog/action-staticcheck\n- reviewdog/action-ast-grep\n- reviewdog/action-typos\n\n### Details\n\nMalicious commit: https://github.com/reviewdog/action-setup/commit/f0d342d\nfix/retag via version upgrade: https://github.com/reviewdog/action-setup/commit/3f401fe\n\nSee the detailed report from Wiz Research: [Wiz Blog Post](https://www.wiz.io/blog/new-github-action-supply-chain-attack-reviewdog-action-setup) and reviewdog maintainer annoucement: [reviewdog #2079](https://github.com/reviewdog/reviewdog/issues/2079)",
  "id": "GHSA-qmg3-hpqr-gqvc",
  "modified": "2025-10-22T19:29:23Z",
  "published": "2025-03-19T15:19:12Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/reviewdog/reviewdog/security/advisories/GHSA-qmg3-hpqr-gqvc"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-30154"
    },
    {
      "type": "WEB",
      "url": "https://github.com/reviewdog/reviewdog/issues/2079"
    },
    {
      "type": "WEB",
      "url": "https://github.com/reviewdog/action-setup/commit/3f401fe1d58fe77e10d665ab713057375e39b887"
    },
    {
      "type": "WEB",
      "url": "https://github.com/reviewdog/action-setup/commit/f0d342d24037bb11d26b9bd8496e0808ba32e9ec"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/reviewdog/reviewdog"
    },
    {
      "type": "WEB",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-30154"
    },
    {
      "type": "WEB",
      "url": "https://www.wiz.io/blog/new-github-action-supply-chain-attack-reviewdog-action-setup"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N/E:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Multiple Reviewdog actions were compromised during a specific time period"
}

GHSA-QMGF-FP85-55GR

Vulnerability from github – Published: 2020-09-04 15:40 – Updated: 2021-10-01 20:39
VLAI
Summary
Malicious Package in bitcionjs
Details

All 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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "bitcionjs"
      },
      "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:23Z",
    "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-qmgf-fp85-55gr",
  "modified": "2021-10-01T20:39:27Z",
  "published": "2020-09-04T15:40:34Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1360"
    }
  ],
  "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 bitcionjs"
}

GHSA-QMJG-G86H-6RC9

Vulnerability from github – Published: 2018-07-23 21:00 – Updated: 2023-09-11 18:24
VLAI
Summary
d3.js is malware
Details

The d3.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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "d3.js"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "1.0.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2017-16044"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:52:19Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "The `d3.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\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-qmjg-g86h-6rc9",
  "modified": "2023-09-11T18:24:05Z",
  "published": "2018-07-23T21:00:28Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16044"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-qmjg-g86h-6rc9"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/497"
    }
  ],
  "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": "d3.js is malware"
}

Mitigation
Implementation Operation

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.