Back to plugin

Security audit

Patchright Stealth Browser

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks patchright-stealth suspicious because it reports ways browser requests could reach private network services despite the plugin’s protections; the findings describe security weaknesses, not evidence of malicious intent.

Consider the suspicious verdict and the potential for browser requests to reach internal services before installing. The scan reports real enforcement weaknesses, but exploitation depends on browser, DNS, proxy, and target-service conditions; it did not perform runtime exploitation.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (2)

other

Error
Location
plugin/dist/index.js:185
Finding

DNS validation is not bound to the browser connection, permitting private-network policy bypass ## Remediation Suggestions 1. **Enforce destination policy at the connection boundary.** Use a mandatory filtering proxy or equivalent egress control that resolves destinations, validates every resulting address, and connects only to an approved address. 2. **Prevent direct browser egress.** Ensure Chrome cannot bypass that enforcement through direct connections, alternative proxy settings, or other browser transports. 3. **Fail closed on resolution errors.** Reject requests when destination safety cannot be established. If a proxy resolves destinations, enforce the policy at that proxy. 4. **Do not treat cached DNS approval as connection authorization.** Caching may improve performance but must not replace validation of the destination actually used. 5. **Preserve hostname semantics safely.** A filtering connection layer should retain appropriate HTTP Host and TLS server-name verification while binding the connection to an approved address. 6. **Add regression tests** for changing DNS answers, inconsistent Node/browser/proxy resolution, failed local resolution followed by successful proxy resolution, and cached public answers followed by private connection destinations.

Content
View full analysis

Vulnerability Details

File Location: plugin/dist/index.js:166–180, 185–215, 367–388
Vulnerability Type: Server-Side Request Forgery / DNS Rebinding — CWE-918, CWE-367
Risk Level: High

Vulnerable Code

DNS validation results are cached independently of Chrome's connection resolution:

javascript
const DNS_TTL_MS = 30_000;
const dnsCache = new Map();
function resolveHost(host) {
    const hit = dnsCache.get(host);
    if (hit && Date.now() - hit.at < DNS_TTL_MS)
        return hit.addresses;
    const addresses = lookup(host, { all: true, verbatim: true }).then((list) => list.map((a) => a.address));
    const entry = { at: Date.now(), addresses };
    dnsCache.set(host, entry);
    if (dnsCache.size > 1000)
        dnsCache.delete(dnsCache.keys().next().value);
    addresses.catch(() => {
        if (dnsCache.get(host) === entry)
            dnsCache.delete(host);
    });
    return addresses;
}

The URL validator permits requests when DNS resolution fails:

javascript
export async function checkRemoteUrl(raw, net) {
    let u;
    try {
        u = new URL(raw);
    }
    catch {
        return "not a valid URL";
    }
    if (u.protocol !== "http:" && u.protocol !== "https:")
        return `${u.protocol} URLs are not allowed`;
    if (net.allowPrivate)
        return null;
    const hostname = u.hostname.toLowerCase().replace(/\.$/, "");
    const port = u.port || (u.protocol === "https:" ? "443" : "80");
    if (net.allowHosts.includes(hostname) || net.allowHosts.includes(`${hostname}:${port}`))
        return null;
    if (hostname === "localhost" || hostname.endsWith(".localhost"))
        return `${hostname} is a loopback host`;
    const bare = hostname.replace(/^\[|\]$/g, "");
    if (isIP(bare.split("%")[0]))
        return isBlockedAddress(bare) ? `${bare} is a local or private address` : null;
    let addresses;
    try {
        addresses = await resolveHost(bare);
    }
    catch {
        return null; // unresolvable
...[truncated 3926 chars]

MCP05

Warning
Location
plugin/dist/index.js:480
Finding

Redirects and unguarded browser transports bypass preventative private-network enforcement ## Remediation Suggestions 1. **Use a mandatory connection-level egress boundary** that blocks private, loopback, link-local, and other disallowed destinations before traffic leaves Chrome. Apply it to all browser transports. 2. **Validate redirect destinations before following them.** Perform this enforcement in a filtering proxy or another layer that controls every redirect-generated connection. 3. **Disable service workers when unnecessary**, including when opening persistent browser profiles. Do not assume ordinary request routing covers their network activity. 4. **Enforce WebSocket destination policy explicitly.** Where comprehensive interception is unavailable, block disallowed destinations through the mandatory proxy or network controls. 5. **Retain page clearing only as defense in depth.** Do not treat navigation to `about:blank` or discarded tool output as prevention of network side effects. 6. **Add regression tests** using a private-address request counter to verify that redirects, service workers, WebSockets, subresources, and popups cannot deliver any requests to blocked destinations. 7. **Align model-facing documentation with actual guarantees** until preventative enforcement is complete, distinguishing blocked connections from requests detected after dispatch.

Content
View full analysis

Vulnerability Details

File Location: plugin/dist/index.js:399–427, 438–450, 480–500
Vulnerability Type: Incomplete Network Authorization / Server-Side Request Forgery — CWE-918
Risk Level: Medium

Vulnerable Code

The browser launch configuration does not disable service workers:

javascript
    const launchOptions = {
        channel: CHANNEL,
        headless: opts?.headless ?? HEADLESS,
        viewport: null,
    };

The installed guards route ordinary requests but observe redirect hops only after request dispatch:

javascript
    // Every http(s) request from every page/popup goes through the address check; workspace files are
    // served from the virtual workspace origin. Redirect hops are not routed by Playwright, so they and
    // committed frame URLs are checked after the fact: the page is cleared and the next call reports it.
    try {
        await context.route("**/*", (route) => handleRoute(sess, route));
    }
    catch (err) {
        await closeContext(context);
        throw err;
    }
    context.on("request", (req) => {
        if (req.redirectedFrom())
            track(sess, checkRedirect(sess, req));
    });
    for (const p of context.pages())
        watchPage(sess, p);
    // Newest tab/popup becomes the active page for this session.
    context.on("page", (p) => {
        watchPage(sess, p);
        sess.page = p;
    });

The redirect handler can clear a page but cannot prevent the redirected request from being dispatched:

javascript
async function clearPage(sess, page, message) {
    sess.blocked ??= message;
    if (page && !page.isClosed())
        await page.goto("about:blank").catch(() => { });
}
async function checkFrameUrl(sess, page, url) {
    if (!url || /^(about|data|blob|chrome-error):/i.test(url) || url.startsWith(`${WORKSPACE_ORIGIN}/`))
        return;
    const reason = /^https?:/i.test(url) ? await checkRemoteUrl(url, sess.net) : `${url.split(":")[0]}: pages are not allowed`;

...[truncated 3495 chars]

SkillSpector findings are pending for this release.

Endor dependency reachability

Checked Nov 18, 2026 · 3:12 PM UTC

No reachable vulnerabilities reported

Endor dependency scan completed.