tl-docs-viewer-create
Audited by Socket on Sep 18, 2026
3 alerts found:
SecurityAnomalyx2The fragment is a React Markdown and Mermaid renderer, not apparent malware. It contains a significant client-side XSS risk because untrusted `content` is converted to HTML without escaping or sanitization and inserted with `dangerouslySetInnerHTML`. Unsafe link schemes and loose Mermaid SVG rendering add further risk. Sanitize Markdown and Mermaid input, restrict link protocols to safe schemes such as HTTPS, and avoid or tightly control raw HTML and `innerHTML`.
This is a React documentation viewer, not apparent malware. The primary security issue is an XSS sink: content returned by the documentation API is inserted as raw HTML. The API content should be sanitized with a trusted HTML sanitizer or rendered through a Markdown renderer that safely escapes HTML. The document path should also be validated and URL-encoded, with traversal prevention enforced server-side. No evidence of credential theft, exfiltration, backdoors, cryptomining, or destructive behavior is present.
This fragment appears to implement documentation-file retrieval and development caching rather than malware. It contains a meaningful file-disclosure and path-containment risk: the Express endpoint is rooted at the process working directory and uses insufficient validation, while the proposed containment helper has a prefix-boundary flaw. The code should constrain paths to a canonical documentation root, verify the resolved path is equal to or below that root using a separator-aware comparison, and avoid serving arbitrary files. No clear malicious supply-chain behavior is present in the shown code.