# GHSA-cr5w-6rv4-r2qg: Malicious Package in maleficent

> The maleficent npm package collects sensitive system and credential data, requiring users to remove it to prevent local information disclosure.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Not stated
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 3 Sep 2020

## What is GHSA-cr5w-6rv4-r2qg?

GHSA-cr5w-6rv4-r2qg is a vulnerability in maleficent, published on 3 Sep 2020. 

### Official description

All versions of `maleficent` contain malicious code. The package is a demonstration of possible risks when installing npm packages. It gathers system information such as: environment variables, OS information, network interface, AWS credentials, npm credentials and ssh keys. The package prints the information to a local file but does not upload it to a remote server.

## Recommendation

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

## Which versions are affected by GHSA-cr5w-6rv4-r2qg?

2 open source packages ship an affected version, including maleficent.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `maleficent` | npm | All versions | None |
| `maleficent` | npm | All versions | None |

## How do I fix GHSA-cr5w-6rv4-r2qg?

No fix has been published for GHSA-cr5w-6rv4-r2qg yet. Limit exposure of the affected software until one is available.

## Is GHSA-cr5w-6rv4-r2qg being exploited?

There is no known exploitation of GHSA-cr5w-6rv4-r2qg in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-cr5w-6rv4-r2qg and fix it if it is affected.

What it is: GHSA-cr5w-6rv4-r2qg is a vulnerability in maleficent, published on 3 Sep 2020. 
Exploitation: There is no known exploitation of GHSA-cr5w-6rv4-r2qg in the wild and no public exploit code.

Affected packages and fixed versions:
- maleficent (npm): affected all versions; no fix listed
- maleficent (npm): affected all versions; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-cr5w-6rv4-r2qg/ (Markdown: https://insights.sbomify.com/GHSA-cr5w-6rv4-r2qg/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-cr5w-6rv4-r2qg

---
From sbomify Insights: https://insights.sbomify.com/GHSA-cr5w-6rv4-r2qg/
Summaries are generated and may contain mistakes; the official description above is the record.
