# GHSA-JPGQ-34QX-JWWC: Malicious code in spectral-core (npm)

- Database: GitHub
- Malicious package: yes
- Published: 2026-10-29
- Modified: 2026-11-03

## Affected versions

- spectral-core (npm): 3.0.6
- spectral-core (npm): 3.0.4
- spectral-core (npm): 3.0.10
- spectral-core (npm): 3.0.5
- spectral-core (npm): 3.0.3
- spectral-core (npm): 3.0.11
- spectral-core (npm): 3.0.7
- spectral-core (npm): 3.0.12
- spectral-core (npm): 3.0.9
- spectral-core (npm): 3.0.2

## Description

## Source: amazon-inspector (451c36f03e81be0ff6c85334587d7ff401de1e5134e179557ec4bc454cd7ba76)
The tarball ships only package.json and binding.gyp (plus a markdown file), with gypfile: true set in package.json so npm invokes node-gyp rebuild on install. binding.gyp declares a 'none'-type target with no native source files; its sole purpose is an inline action that runs `node -e` with an embedded script. At install time that script reads /proc/1/environ and /proc/self/environ (container/pod entrypoint environment variables, which routinely contain CI/CD secrets and cloud credentials), collects DNS/socket/ARP/route reconnaissance output, queries the AWS EC2 instance metadata service at 169.254.169.254 for user-data and meta-data, and POSTs the collected data to the hardcoded collector https://webhook.site/d6092bdc-05c0-45da-a280-c343ea6d6156. The package exposes no library functionality — main: index.js is declared but index.js is not shipped — so the binding.gyp exists solely as a vehicle for install-time code execution and credential exfiltration. The name resembles the legitimate @stoplight/spectral-core project but the shipped contents are unrelated to it.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/0b4a7fbd4eea373a8b90aca1ace688cb95b8b251/osv/malicious/npm/spectral-core/MAL-2026-18377.json))

## References

- https://github.com/ossf/malicious-packages/blob/0b4a7fbd4eea373a8b90aca1ace688cb95b8b251/osv/malicious/npm/spectral-core/MAL-2026-18377.json
- https://www.npmjs.com/package/spectral-core/v/3.0.10
- https://www.npmjs.com/package/spectral-core/v/3.0.11
- https://www.npmjs.com/package/spectral-core/v/3.0.12
- https://www.npmjs.com/package/spectral-core/v/3.0.2
- https://www.npmjs.com/package/spectral-core/v/3.0.3
- https://www.npmjs.com/package/spectral-core/v/3.0.4
- https://www.npmjs.com/package/spectral-core/v/3.0.5
- https://www.npmjs.com/package/spectral-core/v/3.0.6
- https://www.npmjs.com/package/spectral-core/v/3.0.7
- https://www.npmjs.com/package/spectral-core/v/3.0.9
- https://github.com/ossf/malicious-packages/blob/7bf491fa11a2373f90f3ff13c245b5278c0fda1c/osv/malicious/npm/spectral-core/MAL-2026-18377.json
- https://github.com/advisories/GHSA-jpgq-34qx-jwwc

Page: https://cve.now/GHSA-JPGQ-34QX-JWWC

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
