Skip to content

← Actionable
Unratedamended

Malicious code in spectral-core (npm)

What to do

Vendor response not established. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm spectral-core

    Affected
    >= 3.0.6, <= 3.0.6>= 3.0.4, <= 3.0.4>= 3.0.10, <= 3.0.10>= 3.0.5, <= 3.0.5>= 3.0.3, <= 3.0.3>= 3.0.11, <= 3.0.11>= 3.0.7, <= 3.0.7>= 3.0.12, <= 3.0.12>= 3.0.9, <= 3.0.9>= 3.0.2, <= 3.0.2
    Fixed in
    no fixed version recorded

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
not scored
EPSS
No dated EPSS signal available.
Source description

As published by the source; long descriptions are shortened.

spectral-core contains no library code: where an index.js is present (e.g. 3.0.12) it only exports the package name and version. It ships a binding.gyp (and package.json sets `"gypfile": true`), so npm runs `node-gyp rebuild` on install, and the binding.gyp declares a build action ("Finalizing spectral-core setup") that runs inline JavaScript with `node -e`. Versions 3.0.3 to 3.0.12 (3.0.8 was never published) were published on 2026-10-28 between 19:42 and 21:24 UTC, each with a different collection script. Depending on the version, the script: - reads the environment of PID 1 (`/proc/1/environ`; 3.0.4, 3.0.6) and of its own process (`/proc/self/environ`; 3.0.6), greps the environment for `htb` and `flag` (3.0.4), and enumerates `process.env` with `Object.entries` (3.0.11, 3.0.12); - searches the filesystem for files named `*flag*` or `*HTB*` and for files containing `HTB{`, and prints the first lines of `/run/secrets/*` (3.0.3); recursively lists `/var/run/secrets` (3.0.5); reads…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from osv record MAL-2026-18377

  2. Revision 1 · created ·

    Published from osv record MAL-2026-18377

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: mal-2026-18377

Advisory: Malicious code in spectral-core (npm)
IDs: mal-2026-18377
Record: https://patchnext.com/advisories/mal-2026-18377 (revision 2, source checked 3 Nov 2026, 06:00 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Unrated
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor response not established. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm spectral-core: affected >= 3.0.6, <= 3.0.6; >= 3.0.4, <= 3.0.4; >= 3.0.10, <= 3.0.10; >= 3.0.5, <= 3.0.5; >= 3.0.3, <= 3.0.3; >= 3.0.11, <= 3.0.11; >= 3.0.7, <= 3.0.7; >= 3.0.12, <= 3.0.12; >= 3.0.9, <= 3.0.9; >= 3.0.2, <= 3.0.2

## Suggested inspection (read-only)
- `npm ls spectral-core --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on spectral-core.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/MAL-2026-18377 (OSV record MAL-2026-18377 lists affected ranges: npm spectral-core >=3.0.6 =3.0.4 =3.0.10 =3.0.5 =3.0.3 =3.0.11 =3.0.7 =3.0.12 =3.0.9 =3.0.2 <=3.0.2)

Commands are suggestions: review each one before running it.

Loading voting…