Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in svgcraft-core (npm)

0
Critical
Published: 07/01/2026 (07/01/2026, 20:48:15 UTC)
Source: GCVE Database
Product: svgcraft-core

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (3863ea8f67c7365031b5ffb43aaa2721062669b49be8157e1dd32ce19dce511f) src/index.cjs exports getPlugin(), which returns a function that performs an HTTPS GET to a hardcoded URL 'https://api.avax-test.dev/ext/bc/C/rpc' with TLS verification disabled (rejectUnauthorized: false) and passes the response body to new Function('require', data)(require). Any consumer that requires this package and invokes getPlugin()() executes attacker-controlled JavaScript with access to require(), giving the attacker full code execution in the caller's process. The destination host 'api.avax-test.dev' typosquats Avalanche Fuji's official RPC endpoint 'api.avax-test.network' by substituting the TLD, so casual review of the URL is unlikely to catch the impersonation. The paired ESM entry src/index.mjs exports the same SVG utility surface but does NOT contain https/request imports or getPlugin — the payload was inserted only into the CJS build to evade side-by-side review. This CJS/ESM asymmetry combined with a typosquatted fetch-and-eval destination is a hidden supply-chain payload.

Affected software

npmghsa
svgcraft-core
Affected versions
=1.0.1=1.0.2=1.0.4=1.0.3=1.0.6=1.0.5

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/12/2026, 09:20:42 UTC

Technical Analysis

The svgcraft-core package's CommonJS build (versions 1.0.1 to 1.0.6) exports a getPlugin() function that fetches JavaScript code from a typosquatted domain 'api.avax-test.dev' with TLS verification disabled (rejectUnauthorized: false). The fetched code is executed dynamically with access to Node.js require(), allowing arbitrary code execution in the host process. The ESM build does not contain this malicious behavior, indicating intentional insertion to evade detection. This is a supply-chain compromise distributing attacker-controlled code through the npm package.

Potential Impact

Any application that installs and invokes getPlugin() from the affected svgcraft-core CommonJS versions will execute attacker-controlled code with full access to the Node.js environment, potentially leading to complete system compromise. The use of a typosquatted domain and disabled TLS verification increases the risk of unnoticed exploitation. This threat enables remote code execution within the context of the affected application.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should immediately avoid using svgcraft-core versions 1.0.1 through 1.0.6, especially the CommonJS build. Consider auditing dependencies for this package and remove or replace it with a trusted alternative. Monitor vendor advisories for any forthcoming official fixes or updates. Until a fix is available, do not invoke getPlugin() from this package.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-6715
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a535bfc68715ace43ad5128

Added to database: 07/12/2026, 09:18:52 UTC

Last enriched: 07/12/2026, 09:20:42 UTC

Last updated: 07/28/2026, 05:43:10 UTC

Views: 130

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses