# MAL-2024-1959: Malicious code in ccl-component-resources (npm)


- **Type:** Malicious package
- **Package:** `ccl-component-resources` (npm)
- **Published:** 25 Jun 2024
- **Also known as:** GHSA-892p-5g9m-p64x

## What is MAL-2024-1959?

MAL-2024-1959 is a malicious package in ccl-component-resources, published on 25 Jun 2024. 

### Official description

ccl-component-resources@99.0.0 is a dependency-confusion package: name targets a likely-internal package, semver is set to 99.0.0 to win resolution against private registries, and index.js is an empty stub (`module.exports = {}`). package.json declares a `preinstall` lifecycle hook that runs `node pingback.js`. pingback.js reads `os.hostname()` and POSTs a JSON payload (`{hn,...package name, timestamp}`) to https://c.adityasec.com/hJWEvPPiaUrSeF-9_F8XSw on every `npm install`. Any installer whose private dependency resolution mistakenly pulls this public package will leak the host identifier of the affected dev or CI machine to an external server. The package self-describes as an 'authorized PoC,' but the beacon fires unconditionally for every installer regardless of authorization, and the destination is attacker-controlled from the installer's perspective.

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.

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

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-1959 is a malicious package: ccl-component-resources (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-1959/ (Markdown: https://insights.sbomify.com/MAL-2024-1959/index.md)
```

## Sources

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

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