Supply-chain threat intelligence

Incident detail

criticalnpm·malware·osv

Malicious code in svgcraft-core (npm)

svgcraft-core

Risk score

92

AI summary

Indexed incident for svgcraft-core (npm).

Description

The CommonJS entry point exports an undocumented getPlugin() factory that fetches a URL-shortener target (https://shorturl.at/nkw3a) and passes a JSON field from the response to eval, executing attacker-controlled JavaScript inside the caller's Node.js process. The shortener destination is mutable, so the operator can swap the executed payload at any time without republishing the package. Additional concealment signals: the function uses cover-story field names (bearrtoken: 'logo', parsed.cookie guarding eval(parsed.model)); the backdoor exists only in the CommonJS build (the ESM entry omits it); the file requires an undeclared request dependency; and the README advertises 'zero dependencies' and does not mention this behavior. Any consumer invoking getPlugin()() via the CJS build will execute remote code chosen by whoever controls the shortener.

Technical details

Affected versions

=1.0.1=1.0.2=1.0.4=1.0.3

Indicators

  • affected version=1.0.175%
  • affected version=1.0.275%
  • affected version=1.0.475%
  • affected version=1.0.375%

Timeline

  1. Advisory published
  2. Indexed by ThreatPkg

Related incidents