daub-ui
Audited by Socket on Aug 3, 2026
5 alerts found:
Securityx3Anomalyx2No clear evidence in this fragment of classic malware behaviors (backdoor, credential theft, reverse shell, or overt exfiltration). However, it intentionally implements a high-risk capability: rendering AI/user-provided CustomHTML by injecting raw HTML and CSS (only stripping <script> tags) and is designed to forward/spec-execute CustomHTML JavaScript inside a preview iframe. Additionally, the test pipeline uses wildcard postMessage and a weak trust model for incoming messages. Overall, this should be treated as a security-critical untrusted-content execution surface rather than a benign renderer.
This UI renderer module is mostly safe when it renders untrusted text via textContent, but it contains a significant security weakness in RENDERERS.CustomHTML. It injects attacker-controlled HTML into the DOM using createContextualFragment after only regex-stripping literal <script> tags, which is insufficient to prevent XSS via many other active content vectors. It also injects attacker-controlled CSS via a style element. Link href assignment and image src loading add additional risk depending on external validation (not shown). No explicit malware/persistence behavior is evident in this fragment, but the HTML/CSS injection capability makes the package security-critical if p.html/p.css are not fully trusted and sanitized.
Primary finding: the fragment injects untrusted HTML from components.json into the page using preview.innerHTML = c.html without sanitization. If components.json (or its hosting/delivery) is compromised, this enables DOM-based XSS in the documentation page context. Other behaviors (textContent rendering, search filtering, code-as-text display) are relatively safer. Clipboard copying and the window.DAUB.init hook are secondary risks that can further support an attack chain or broaden the execution boundary.
No clear indicators of intentional malware/backdoor behavior are present in the provided module (no execution gadgets, credential theft, or system modification). The dominant risk is privacy/supply-chain boundary exposure: the script uploads a base64 screenshot and includes rendered HTML/spec context (and row prompt data) to an external Gemini endpoint without redaction. Secondary concerns include permissive JSON parsing of model output and potential spreadsheet CSV formula injection depending on the (unshown) escapeCSV implementation, plus verbose debug logging when DEBUG is enabled.
No clear evidence of traditional malware (no keylogging, reverse shell, file/process manipulation, cryptomining, or hardcoded secrets). However, the code provides a powerful 'fetch and render' capability: it navigates a headless browser to a client-supplied URL and extracts page content/screenshot using CDP (Runtime.evaluate). This can introduce significant security risks such as SSRF-like access to internal resources (depending on Browserbase egress), data leakage of page contents to the requester, and rate-limit bypass if RL_WEBLOOK errors are ignored. Overall, the behavior appears consistent with a scraping/capture service rather than sabotage, but it should be reviewed for network access controls and abuse prevention.