chrome-cdp
Audited by Socket on Aug 28, 2026
3 alerts found:
Anomalyx2SecurityThe code appears to be a legitimate browser automation module. It contains no clear malware indicators or intentional obfuscation. The primary risks are architectural: arbitrary CDP access through evalRawStr, unrestricted HTTP(S) navigation that may reach internal resources, possible sensitive page-data exposure, and caller-controlled screenshot paths. These capabilities should only be exposed to trusted callers and should be constrained with CDP method allowlists, destination restrictions, and safe output-path handling.
The fragment appears to be a legitimate Chrome DevTools/browser automation daemon. It contains an intentional powerful control surface, including arbitrary browser-context JavaScript evaluation, navigation, page-data retrieval, and user-input simulation. Because the socket protocol has no authentication or authorization in this file, unauthorized local clients could control the attached browser or access its data if socket exposure and permissions are insufficient. No evidence of credential theft, external exfiltration, destructive behavior, or obfuscated malware is present.
This is a legitimate-looking CDP helper for evaluating JavaScript expressions, not evidence of malware in isolation. It creates a significant code-execution security risk if callers pass untrusted or attacker-controlled expressions, because `Runtime.evaluate` executes them directly in the connected browser or JavaScript runtime. Restrict access to the function and validate or avoid untrusted expressions.