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.

525 vulnerabilities reference this CWE, most recent first.

GHSA-HJ5W-XGW9-W4RJ

Vulnerability from github – Published: 2020-09-03 19:41 – Updated: 2021-10-01 20:58
VLAI
Summary
Malicious Package in coinstrng
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": "coinstrng"
      },
      "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:20Z",
    "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-hj5w-xgw9-w4rj",
  "modified": "2021-10-01T20:58:49Z",
  "published": "2020-09-03T19:41:44Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1385"
    }
  ],
  "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 coinstrng"
}

GHSA-HM6Q-R2JC-CPQH

Vulnerability from github – Published: 2019-12-16 19:29 – Updated: 2023-09-06 20:10
VLAI
Summary
lodahs is malware
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": "lodahs"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2019-19771"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2019-12-15T14:26:04Z",
    "nvd_published_at": "2019-12-12T20:15:00Z",
    "severity": "HIGH"
  },
  "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-hm6q-r2jc-cpqh",
  "modified": "2023-09-06T20:10:25Z",
  "published": "2019-12-16T19:29:33Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-19771"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1417"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/package/lodahs"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "lodahs is malware"
}

GHSA-HVGC-MGGG-PXR2

Vulnerability from github – Published: 2020-09-03 23:02 – Updated: 2021-09-30 17:12
VLAI
Summary
Malicious Package in js-sha7
Details

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

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "js-sha7"
      },
      "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:44Z",
    "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-hvgc-mggg-pxr2",
  "modified": "2021-09-30T17:12:40Z",
  "published": "2020-09-03T23:02:33Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1284"
    }
  ],
  "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-sha7"
}

GHSA-HWH3-FHF6-73X9

Vulnerability from github – Published: 2020-09-04 15:36 – Updated: 2021-10-01 20:38
VLAI
Summary
Malicious Package in bictoinjs-lib
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": "bictoinjs-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:13Z",
    "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-hwh3-fhf6-73x9",
  "modified": "2021-10-01T20:38:19Z",
  "published": "2020-09-04T15:36:09Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1356"
    }
  ],
  "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 bictoinjs-lib"
}

GHSA-HWHQ-3HRJ-V6V5

Vulnerability from github – Published: 2020-09-01 19:00 – Updated: 2023-09-08 18:49
VLAI
Summary
cross-env.js is malware
Details

The cross-env.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": "cross-env.js"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2017-16081"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-08-31T18:26:15Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "The `cross-env.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-hwhq-3hrj-v6v5",
  "modified": "2023-09-08T18:49:03Z",
  "published": "2020-09-01T19:00:54Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16081"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/520"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "cross-env.js is malware"
}

GHSA-HXXF-Q3W9-4XGW

Vulnerability from github – Published: 2018-07-12 19:52 – Updated: 2021-09-14 17:35
VLAI
Summary
Malicious Package in eslint-scope
Details

Version 3.7.2 of eslint-scope was published without authorization and was found to contain malicious code. This code would read the users .npmrc file and send any found authentication tokens to 2 remote servers.

Recommendation

The best course of action if you found this package installed in your environment is to revoke all your npm tokens. You can find instructions on how to do that here. https://docs.npmjs.com/getting-started/working_with_tokens#how-to-revoke-tokens

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "eslint-scope"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.7.2"
            },
            {
              "fixed": "3.7.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "3.7.2"
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "eslint-config-eslint"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.0.2"
            },
            {
              "fixed": "6.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "5.0.2"
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:41:33Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "Version 3.7.2 of `eslint-scope` was published without authorization and was found to contain malicious code. This code would read the users `.npmrc` file and send any found authentication tokens to 2 remote servers.\n\n\n## Recommendation\n\nThe best course of action if you found this package installed in your environment is to revoke all your npm tokens. You can find instructions on how to do that here. https://docs.npmjs.com/getting-started/working_with_tokens#how-to-revoke-tokens",
  "id": "GHSA-hxxf-q3w9-4xgw",
  "modified": "2021-09-14T17:35:41Z",
  "published": "2018-07-12T19:52:02Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/eslint/eslint-scope/issues/39"
    },
    {
      "type": "WEB",
      "url": "https://eslint.org/blog/2018/07/postmortem-for-malicious-package-publishes"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-hxxf-q3w9-4xgw"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/eslint/eslint-scope"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-ESLINTSCOPE-11120"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/673"
    }
  ],
  "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 eslint-scope"
}

GHSA-J3QQ-QVC8-C6G7

Vulnerability from github – Published: 2020-09-01 21:15 – Updated: 2021-10-01 13:29
VLAI
Summary
Malicious Package in foever
Details

All versions of foever are considered malicious. The package is malware designed to take advantage of users making a mistake when typing the name of a module to install. When executed, the package calls home to a Command and Control server to execute arbitrary commands.

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 all credentials found on the compromised machine, as well as completely erase the affected machine and reinstall your Operating System.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "foever"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-08-31T18:32:50Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "All versions of `foever` are considered malicious. The package is malware designed to take advantage of users making a mistake when typing the name of a module to install. When executed, the package calls home to a Command and Control server to execute arbitrary commands.\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 all credentials  found on the compromised machine, as well as completely erase the affected machine and reinstall your Operating System.",
  "id": "GHSA-j3qq-qvc8-c6g7",
  "modified": "2021-10-01T13:29:49Z",
  "published": "2020-09-01T21:15:09Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/688"
    }
  ],
  "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 foever"
}

GHSA-J49G-MP79-5VM5

Vulnerability from github – Published: 2018-08-06 20:06 – Updated: 2023-09-07 18:25
VLAI
Summary
coffe-script is malware
Details

The coffe-script package is a piece of malware that steals sensitive data such as a user's private SSH key and bash history, sending them to attacker controlled locations.

All versions have been unpublished from the npm registry.

Recommendation

If you have found coffe-script 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 SSH keys, registry credentials, tokens, and any other sensitive credentials that may have been present in your bash history.

Additionally, any service which may have been exposed via credentials in your bash history or accessible via your ssh keys, such as a database, should be reviewed for indicators of compromise as well.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "coffe-script"
      },
      "versions": [
        "1.0.1"
      ]
    }
  ],
  "aliases": [
    "CVE-2017-16203"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-506"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:41:58Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "The `coffe-script` package is a piece of malware that steals sensitive data such as a user\u0027s private SSH key and bash history, sending them to attacker controlled locations. \n\nAll versions have been unpublished from the npm registry.\n\n\n\n## Recommendation\n\nIf you have found `coffe-script` 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 SSH keys, registry credentials, tokens, and any other sensitive credentials that may have been present in your bash history.\n\nAdditionally, any service which may have been exposed via credentials in your bash history or accessible via your ssh keys, such as a database, should be reviewed for indicators of compromise as well.",
  "id": "GHSA-j49g-mp79-5vm5",
  "modified": "2023-09-07T18:25:01Z",
  "published": "2018-08-06T20:06:29Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16203"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-j49g-mp79-5vm5"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/543"
    }
  ],
  "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": "coffe-script is malware"
}

GHSA-J4VM-HG8G-G9QV

Vulnerability from github – Published: 2020-09-03 17:33 – Updated: 2021-09-30 18:39
VLAI
Summary
Malicious Package in antd-cloud
Details

All versions of antd-cloud 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": "antd-cloud"
      },
      "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:27Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "All versions of `antd-cloud` 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-j4vm-hg8g-g9qv",
  "modified": "2021-09-30T18:39:55Z",
  "published": "2020-09-03T17:33:50Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1049"
    }
  ],
  "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 antd-cloud"
}

GHSA-J67M-JG9P-PPG4

Vulnerability from github – Published: 2020-09-03 23:18 – Updated: 2021-10-01 16:10
VLAI
Summary
Malicious Package in ns-sha3
Details

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

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "ns-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:17Z",
    "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-j67m-jg9p-ppg4",
  "modified": "2021-10-01T16:10:45Z",
  "published": "2020-09-03T23:18:05Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1298"
    }
  ],
  "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 ns-sha3"
}

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.