Skip to main content

OpenClaw vulnerability scanner - Detect ClawJacked (CVE-2026-CLAW)

Project description

ClawCheck

๐Ÿ›ก๏ธ OpenClaw Vulnerability Scanner

Detect the ClawJacked vulnerability (CVE-2026-CLAW) in OpenClaw installations

Python Version License

Quick Start

pip install clawcheck
clawcheck

Overview

ClawCheck is a CLI security tool that detects the ClawJacked vulnerability in OpenClaw installations. The vulnerability, disclosed by Oasis Security on February 26, 2026, allows any website to silently hijack OpenClaw agents through WebSocket exploitation.

What it does:

  • โœ… Scans for OpenClaw installations
  • โœ… Checks version against vulnerable range (< 2026.2.25)
  • โœ… Probes WebSocket gateway for security indicators
  • โœ… Provides remediation guidance
  • โœ… CI/CD integration (JSON/SARIF output)

What it doesn't do:

  • โŒ No external data transmission (offline-capable)
  • โŒ No brute-force attacks (read-only probes)
  • โŒ No system modifications (in scan mode)

Installation

pip (Recommended)

pip install clawcheck

pipx (Isolated Installation)

pipx install clawcheck

From Source

git clone https://github.com/yourusername/clawcheck.git
cd clawcheck
pip install -e .

Usage

Basic Scan

clawcheck

Example output:

โœ— VULNERABLE: 1 vulnerability(ies) found

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” Target Information โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ                                                      โ”ƒ
โ”ƒ OpenClaw Version    2026.2.12                       โ”ƒ
โ”ƒ Gateway Status      Running                         โ”ƒ
โ”ƒ Config Path         /Users/user/.openclaw/...         โ”ƒ
โ”ƒ Instance Type       local                           โ”ƒ
โ”ƒ                                                      โ”ƒ
โ”—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”›

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” CLAWJACKED โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” VULNERABLE โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ WebSocket hijacking via localhost origin bypass         โ”ƒ
โ”ƒ                                                              โ”ƒ
โ”ƒ  Indicator             Status                            โ”ƒ
โ”ƒ  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€             โ”€โ”€โ”€โ”€โ”€โ”€                            โ”ƒ
โ”ƒ  Version Check         VULNERABLE                        โ”ƒ
โ”ƒ  Origin Validation     FAIL                              โ”ƒ
โ”ƒ  Rate Limiting         FAIL                              โ”ƒ
โ”ƒ  Trust Registration    FAIL                              โ”ƒ
โ”ƒ                                                              โ”ƒ
โ”ƒ  Auto-fix: openclaw upgrade                                โ”ƒ
โ”ƒ  Manual steps:                                              โ”ƒ
โ”ƒ    โ€ข Update to OpenClaw 2026.2.25 or later               โ”ƒ
โ”ƒ    โ€ข Verify gateway configuration...                       โ”ƒ
โ”—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”›

JSON Output

clawcheck --json
clawcheck --json --output results.json

SARIF Output (CI/CD)

clawcheck --sarif

Verbose Mode

clawcheck -v        # Verbose
clawcheck -vv       # Extra verbose (includes WebSocket probing)

Fix Mode

# Dry run - see what would be done
clawcheck fix --dry-run

# Apply fix (with confirmation)
clawcheck fix

# Apply fix without confirmation
clawcheck fix --force

Monitoring Mode

# Monitor continuously (60s interval)
clawcheck monitor

# Custom interval
clawcheck monitor --interval 30

# With log file
clawcheck monitor --log-file clawcheck.log

Advanced Options

# Custom timeout
clawcheck --timeout 60

# Custom config path
clawcheck --config-path /custom/path/openclaw.json

# All options combined
clawcheck -vv --json --output scan.json --timeout 60

Exit Codes

Code Meaning Use Case
0 SECURE No vulnerabilities found
1 VULNERABLE Vulnerabilities detected
2 ERROR Scan error (permissions, timeout, etc.)
3 NOT_FOUND OpenClaw not installed or not running

Script Integration Example:

#!/bin/bash
clawcheck --json --output scan.json
EXIT_CODE=$?

case $EXIT_CODE in
  0) echo "โœ“ Secure - no action needed" ;;
  1) echo "โœ— Vulnerable - apply fix with: clawcheck fix" ;;
  2) echo "โš  Error - check logs" ;;
  3) echo "โ—‹ OpenClaw not found" ;;
esac

exit $EXIT_CODE

About the Vulnerability

ClawJacked (CVE-2026-CLAW)

Disclosed: February 26, 2026 Severity: HIGH Affected Versions: OpenClaw < 2026.2.25

Attack Vector:

  1. WebSocket Origin Bypass - Malicious JavaScript can connect to localhost:18789 without CORS restrictions
  2. No Localhost Rate Limiting - Brute-force attacks at hundreds of attempts per second
  3. Automatic Trust Registration - Successful auth from localhost auto-approves device pairing

Impact: Full workstation compromise initiated from a browser tab

Fix: Update to OpenClaw 2026.2.25 or later

Source: Oasis Security Vulnerability Disclosure

Safety & Privacy

  • โœ… Offline-capable - No external data transmission
  • โœ… Read-only probes - No system modification
  • โœ… Rate-limited - 1 request/second (AWS cooperative scanning guidelines)
  • โœ… No brute-force - Never attempts password guessing
  • โœ… Open source - Fully auditable code

Development

Running Tests

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run with coverage
pytest --cov=clawcheck --cov-report=html

Project Structure

clawcheck/
โ”œโ”€โ”€ src/clawcheck/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ cli.py           # Click CLI interface
โ”‚   โ”œโ”€โ”€ discovery.py     # OpenClaw discovery
โ”‚   โ”œโ”€โ”€ models.py        # Data models
โ”‚   โ”œโ”€โ”€ output.py        # Output formatters
โ”‚   โ”œโ”€โ”€ probe.py         # WebSocket vulnerability probe
โ”‚   โ””โ”€โ”€ vuln_db.py       # Vulnerability database
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ unit/            # Unit tests
โ”‚   โ””โ”€โ”€ integration/     # Integration tests
โ”œโ”€โ”€ docs/                # Documentation
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ README.md

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Run tests and linting
  6. Submit a pull request

License

MIT License - see LICENSE file for details

Disclaimer

This tool is for security testing purposes only. Always obtain proper authorization before scanning systems. The authors are not responsible for misuse of this software.

Links


Stay secure! ๐Ÿ›ก๏ธ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clawcheck-1.0.0.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clawcheck-1.0.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file clawcheck-1.0.0.tar.gz.

File metadata

  • Download URL: clawcheck-1.0.0.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for clawcheck-1.0.0.tar.gz
Algorithm Hash digest
SHA256 371a4c71b53d17658092ad29ac88ac2144a2ec77a1b97879d91dfc86cc77be57
MD5 8d087243974bbf51d7788dc454b0100a
BLAKE2b-256 5263745337d6a41fc548c4bc6aa09aaddf5a6815b30214fdef5fef0a60b2f611

See more details on using hashes here.

File details

Details for the file clawcheck-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: clawcheck-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for clawcheck-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f98ce771fbfaa30f7d4fd4d226f08e3bdda16a02c4daf985f9dabfd06da168ca
MD5 82e609db8bee9a07dba70e1fbfbfaf31
BLAKE2b-256 d95694cc28acdd32eaf0ba588452848c887177b2e5e712d8cf12164fa318943b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page