Back to skill

Security audit

Headful Browser (VNC)

Security checks for vulnerabilities and agentic risk

Overview

ClawScan’s benign verdict reflects browser-session and tab-capture behavior that mostly fits the stated purpose, while noting that cookie and storage-state exports add sensitive capabilities and some scan coverage is incomplete.

The verdict is benign with medium confidence, not a guarantee of safety. Before installing, consider whether you need cookie or storage-state export, since those outputs may contain authentication data. Coverage was partial: 23 of 26 components were fully scanned, and static tool-misuse analysis could not fully interpret three files.

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
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (48)

Tainted flow: 'port' from os.environ.get (line 562, credential/environment) → urllib.request.build_opener.open (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · tools/browser.py (reported line 266)May include surrounding context.

python
def local_json(port, path):
    opener = urllib.request.build_opener(urllib.request.ProxyHandler({}))
    with opener.open(f'<redacted-url>}', timeout=2) as response:
        return json.load(response)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · CHANGELOG.md (reported line 9)May include surrounding context.

md
- Capture an exact existing targetId without navigation; separate explicit navigation and URL-scoped cookie export. Preserve partial results with nonzero exit status.
- Add cooperative operator pause/resume and JSON start/status/pages/capture/stop commands.
- Read current-origin localStorage directly for existing CDP sessions; document omitted authentication state.
- Keep Chrome sandbox enabled and reject root Chrome. Remove executable .env loading, privileged auto-installs, global pkill and wget fallback.
- Add locked Playwright dependency, behavior tests, real CDP integration test and Linux lifecycle workflow.
- Breaking: named CLI arguments, explicit target/URL, new state/output layout, reduced supported config. See README migration.
- Withdraw unverified Docker instructions; Linux host deployment is the supported path.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.docker.md (reported line 5)May include surrounding context.

md
The old 1.0.2 reference used Ubuntu's Snap-oriented chromium-browser package,
root-oriented configuration and ignored installation failures. Its entrypoint
also sourced executable .env files and used the old positional CLI. The ClawHub
bundle omitted the entrypoint and Compose files. The legacy Docker files and
systemd templates are retired in this release because they do not implement the
new session lifecycle or its default protections.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 216)May include surrounding context.

md
are replaced by named arguments. export_page.sh no longer accepts a URL:
use --target for same-tab capture, or navigate-and-capture when navigation is intended.

Recreate .env from the example. Remove VNC_IMPLEMENTATION (runtime is x11vnc),
ALLOW_CHROME_FORCE_RESTART, CHROME_EXTRA_FLAGS, CHROME_USER_DATA_DIR and legacy
TMP_* settings. setup.sh no longer supports --auto-install or --yes; dependency
installation is a reviewed host step. The sourced shell .env loader is removed.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 219)May include surrounding context.

md
Recreate .env from the example. Remove VNC_IMPLEMENTATION (runtime is x11vnc),
ALLOW_CHROME_FORCE_RESTART, CHROME_EXTRA_FLAGS, CHROME_USER_DATA_DIR and legacy
TMP_* settings. setup.sh no longer supports --auto-install or --yes; dependency
installation is a reviewed host step. The sourced shell .env loader is removed.
State and output paths are now per session, and cookies require explicit export.

The imported source version and file inventory are recorded in SOURCE.json.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · config.example.env (reported line 1)May include surrounding context.

text
# Copy to .env and chmod 600. Use literal absolute paths; no $HOME or shell code.
VNC_PASSFILE=/absolute/path/to/vnc.passwd
VNC_RESOLUTION=1366x768
# Unset ports/display are allocated automatically.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup.sh (reported line 23)May include surrounding context.

sh
chmod 600 "$2"
    if [ "$(wc -c < "$2" | tr -d ' ')" != 8 ]; then echo 'Invalid rfbauth output' >&2; exit 1; fi
    trap - EXIT
    echo "Set VNC_PASSFILE=$2 in .env (chmod 600) or your environment."
    ;;
  --help|--hints)
    cat <<'HELP'

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 160)May include surrounding context.

md
## Configuration

Copy config.example.env to .env, then chmod 600 .env. Only the skill-root .env is read.
Environment variables override file values; command-line options override both.
Values are literal KEY=value, optionally wrapped in matching quotes; no variable
expansion, command substitution, export statements, or executable shell syntax.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

CDP attachment, navigation, and page capture are consistent with the description. However, explicit cookie and storage-state extraction are additional sensitive capabilities not disclosed by the stated purpose of human-assisted browsing and tab capture. These are separate export operations, not merely implementation details needed to capture a page. The exports are written locally with restrictive permissions; the supplied code does not show external exfiltration.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

Most behavior directly supports the description, including persistent profiles, local VNC/noVNC services, CDP access, process management, and capture delegation. However, explicit cookie and storage-state export commands go beyond capturing an existing tab and can expose authentication/session material. These sensitive export capabilities are not disclosed in the description. The supplied code establishes and invokes these command paths, although the delegated exporter implementation is unavailable, so its exact output cannot be verified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

Cookie export is a distinct capability beyond maintaining, inspecting, or capturing a browser session. The wrapper explicitly invokes a cookie-related command rather than session startup or tab capture. The supplied code does not establish which cookies are accessed, where they are written, or whether any external transmission occurs.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

Existing-tab capture and explicit navigation fit the declared browser workflow. However, dedicated cookie and storage-state export operations expose session data beyond ordinary page capture and are not disclosed in the description. These operations are explicitly invoked and scoped, and the tests do not indicate external exfiltration. Because only tests are supplied, the finding concerns capabilities exercised by the tests rather than an independently verified implementation. The absence of VNC/session-management code in this test file is not itself a mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
84% confidence
Finding

Persistent browser operation and non-disruptive CDP capture match the description. However, explicit cookie and storage-state export are additional session-data extraction capabilities not disclosed by tab capture or human takeover. The test demonstrates URL-scoped cookie export and localStorage export using synthetic data; it does not show external transmission or malicious activity. The absence of VNC/noVNC implementation in this test is not itself a mismatch.

Content

No source excerpt is available for this finding.

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · tests/export.test.js (reported line 38)May include surrounding context.

js
'state' }] }),
    ...overrides,
  };
  const browser = { contexts: () => [context], close: async () => { calls.disconnect++; } };
  const dependencies = { chromium: { connectOverCDP: async endpoint => {
    assert.equal(endpoint, 'http://127.0.0.1:9222');
    return browser;
  } } };
  const run = (command, extra = []) => main([command, '--port', '9222', '--out', directory,
    ...(command === 'cookies' ? [] : ['--target', 'operator-tab']), ...extra], dependencies);
  return { directory, calls, run };
}

test('capture preserves existing operator tab and emits private artifacts without cookies', async t => {
  const { directory, calls, run } = fixture(t);
  const { result, code } = await run('capture');
  assert.equal(code, 0);
  assert.equal(result.success, true);
  assert.equal(calls.goto, 0);
  assert.equal(calls.disconnect, 1);
  assert.equal(calls.detached, 1);
  assert.equal(fs.readFileSync(path.join(directory, 'page.html'), 'utf8'), '<div>operator edited state</div>');
  assert

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · tests/export.test.js (reported line 108)May include surrounding context.

js
test('unsafe URL, invalid port, unknown flags and missing target fail validation', () => {
  const base = ['--out', '/tmp/artifacts', '--port', '9222'];
  assert.throws(() => options(['capture', ...base]), /target/);
  assert.throws(() => options(['cookies', ...base, '--url', 'file:///etc/passwd']), /http/);
  assert.throws(() => options(['cookies', ...base, '--url', 'https://***@example.test']), /credentials/);
  assert.throws(() => options(['capture', '--port', '80']), /port/);
  assert.throws(() => options(['capture', ...base, '--wat']), /Unknown/);

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/linux_integration.py (reported line 24)May include surrounding context.

python
self.assertNotEqual(os.getuid(), 0, 'Run as non-root, with Chrome sandbox enabled')
        self.temp = tempfile.TemporaryDirectory(prefix='headful-linux-')
        self.directory = Path(self.temp.name)
        self.env = {**os.environ, 'BROWSER_STATE_DIR': str(self.directory / 'state'),
                    'OUT_DIR': str(self.directory / 'out'), 'VNC_PASSFILE': str(self.directory / 'passwd')}
        # A known dummy password solely for this temporary local test session.
        subprocess.run(['x11vnc', '-storepasswd', 'testonly', self.env['VNC_PASSFILE']],

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · tests/test_browser.py (reported line 25)May include surrounding context.

python
self.directory = Path(self.temp.name)

    def test_configuration_is_literal_not_shell(self):
        config = self.directory / '.env'
        config.write_text('VNC_PORT=5908\nOUT_DIR="/tmp/path with spaces"\n# comment\n')
        config.chmod(0o600)
        self.assertEqual(browser.load_config(config), {'VNC_PORT': '5908', 'OUT_DIR': '/tmp/path with spaces'})

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · tests/test_browser.py (reported line 36)May include surrounding context.

python
self.assertFalse(marker.exists())

    def test_unsafe_config_permissions_and_symlink_are_rejected(self):
        config = self.directory / '.env'
        config.write_text('VNC_PORT=5901')
        config.chmod(0o644)
        with self.assertRaises(browser.BrowserError):

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · tests/test_browser.py (reported line 48)May include surrounding context.

python
browser.load_config(link)

    def test_unknown_and_legacy_config_rejected(self):
        config = self.directory / '.env'
        config.write_text('ALLOW_CHROME_FORCE_RESTART=true')
        config.chmod(0o600)
        with self.assertRaises(browser.BrowserError):

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · tools/browser.py (reported line 73)May include surrounding context.

python
def config():
    result = load_config(ROOT / '.env')
    result.update({k: os.environ[k] for k in CONFIG_KEYS if k in os.environ})
    return {k: v for k, v in result.items() if v != ''}

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/test_browser.py (reported line 125)May include surrounding context.

python
@unittest.skipUnless(os.path.isdir('/proc/self'), 'Linux /proc required')
    def test_stop_preserves_an_unrelated_process(self):
        owned = subprocess.Popen(['sleep', '60'], start_new_session=True,
                                 env={**os.environ, 'HF_SESSION_TOKEN': 'test-owned'})
        unrelated = subprocess.Popen(['sleep', '60'], start_new_session=True)
        self.addCleanup(lambda: unrelated.poll() is None and unrelated.terminate())
        self.addCleanup(lambda: owned.poll() is None and owned.terminate())

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tools/browser.py (reported line 186)May include surrounding context.

python
log_path = directory / f'{role}.log'
    fd = os.open(log_path, os.O_WRONLY | os.O_CREAT | os.O_APPEND | os.O_NOFOLLOW, 0o600)
    os.fchmod(fd, 0o600)
    env = {**os.environ, 'HF_SESSION_TOKEN': state['token'], 'DISPLAY': state['display'],
           'XAUTHORITY': str(directory / 'Xauthority')}
    env.update(environment or {})
    try:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tools/browser.py (reported line 347)May include surrounding context.

python
def x_ready():
            return subprocess.run(['xdpyinfo', '-display', display], stdout=subprocess.DEVNULL,
                                  stderr=subprocess.DEVNULL, timeout=2,
                                  env={**os.environ, 'XAUTHORITY': str(auth)}).returncode == 0
        wait_ready(record, x_ready, 'Xvfb')
        if shutil.which('fluxbox'):
            launch(state, directory, 'wm', ['fluxbox'])

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 19)May include surrounding context.

Debian 12/13 host example (review package names for your distribution):

bash
sudo apt-get update
sudo apt-get install -y xvfb xauth x11vnc x11-utils fluxbox chromium fonts-noto-cjk
# Optional noVNC operator UI:
sudo apt-get install -y novnc websockify

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 20)May include surrounding context.

bash
sudo apt-get update
sudo apt-get install -y xvfb xauth x11vnc x11-utils fluxbox chromium fonts-noto-cjk
# Optional noVNC operator UI:
sudo apt-get install -y novnc websockify
npm ci --omit=dev