preview-d3

Warn

Audited by Socket on Apr 17, 2026

1 alert found:

Security
SecurityMEDIUM
templates/scripts/d3-renderer.js

The key risk in this module is an explicit dynamic script-loading execution primitive: it derives script.src from DOM-provided JSON ('d3-user-code-src') and appends it to document.head without visible allowlisting/validation. If an attacker can influence that DOM value or the referenced resource, this enables arbitrary JavaScript execution in the page context (high security impact). Additional risks include innerHTML-based UI rendering (dependent on helper escaping) and DOM ID/class creation from regex-parsed untrusted code text. No clear standalone malware behavior (exfiltration/backdoor logic) is present in the snippet itself, but the execution mechanism makes malware/supply-chain compromise plausible.

Confidence: 71%Severity: 78%
Audit Metadata
Analyzed At
Apr 17, 2026, 09:39 AM
Package URL
pkg:socket/skills-sh/veelenga%2Fpreview-skills%2Fpreview-d3%2F@340ca82b1ba50ea7aa7dd14a937ebef2ac2943d7
Security Audit — socket — preview-d3