# MAL-2024-2779: Malicious code in oauth-connect (npm)


- **Type:** Malicious package
- **Package:** `oauth-connect` (npm)
- **Published:** 25 Jun 2024
- **Also known as:** GHSA-35fj-cp92-rv2m

## What is MAL-2024-2779?

MAL-2024-2779 is a malicious package in oauth-connect, published on 25 Jun 2024. 

### Official description

package.json declares a `preinstall: node index.js` hook that fires automatically on `npm install`. index.js collects installer-side data — `os.hostname()`, `os.userInfo()`, home directory, DNS server configuration, the contents of `/etc/passwd` and `/etc/hosts`, and the contents of the consumer's `package.json` — then HTTPS POSTs the assembled JSON to `f3js0y9srl22itqjffo9jbl8mzswgm4b.oastify.com`, an attacker-controlled Burp Collaborator subdomain. The package's advertised purpose (an OAuth helper) bears no relationship to reading `/etc/passwd` or beaconing host identifiers off-machine. This is a reconnaissance / dependency-confusion exfiltration payload that runs unattended on every installer.

## What should I do about MAL-2024-2779?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2024-2779 is a malicious package: oauth-connect (npm). Every version was published to cause harm.

Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.

Reference: https://insights.sbomify.com/MAL-2024-2779/ (Markdown: https://insights.sbomify.com/MAL-2024-2779/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2024-2779

---
From sbomify Insights: https://insights.sbomify.com/MAL-2024-2779/
Summaries are generated and may contain mistakes; the official description above is the record.
