canvas
Audited by Socket on Aug 24, 2026
3 alerts found:
Anomalyx2SecurityNo direct malicious logic (e.g., credential theft, reverse shells, or data exfiltration) is evident in this module. However, it performs on-demand runtime installation of a renderer package into a local cache and then dynamically imports executable JS from that cache path, using a semver range and disabling npm audit/funding checks. This creates meaningful supply-chain and cache-tampering/trust-boundary risk; the most important security concern is execution of third-party code fetched/installed at runtime.
No explicit evidence of credential theft, malware persistence, or overt backdoors is present in this fragment. However, the code contains a high-impact supply-chain/loader security risk: it fetches attacker-influenced (or compromised) external content referenced by data-diagram-src and injects it into the DOM via container.innerHTML without sanitization or validation. In an adversarial threat model where URL/content can be influenced, this can enable DOM XSS/active-content execution through injected SVG/HTML. Consumers should strictly control/allowlist data-diagram-src, ensure server-side sanitization or use a safe parsing/sanitization approach (e.g., DOMPurify with a strict SVG policy) before innerHTML assignment.
This module is not indicative of intentional malware (no command execution, no outbound exfiltration, no dynamic code execution, and no obfuscation). However, it is security-sensitive as an application: it exposes an unauthenticated HTTP endpoint on 0.0.0.0 that writes arbitrary (mostly unvalidated) JSON content to disk, and it trusts Content-Length without bounds, enabling memory and disk exhaustion or unwanted persistent storage if reachable by untrusted clients. The primary concerns are availability and misuse risk rather than stealthy compromise.