OpenClaw vulnerability scanner - Detect ClawJacked (CVE-2026-CLAW)
Project description
ClawCheck
๐ก๏ธ OpenClaw Vulnerability Scanner
Detect the ClawJacked vulnerability (CVE-2026-CLAW) in OpenClaw installations
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:
- WebSocket Origin Bypass - Malicious JavaScript can connect to
localhost:18789without CORS restrictions - No Localhost Rate Limiting - Brute-force attacks at hundreds of attempts per second
- 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:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run tests and linting
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
371a4c71b53d17658092ad29ac88ac2144a2ec77a1b97879d91dfc86cc77be57
|
|
| MD5 |
8d087243974bbf51d7788dc454b0100a
|
|
| BLAKE2b-256 |
5263745337d6a41fc548c4bc6aa09aaddf5a6815b30214fdef5fef0a60b2f611
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f98ce771fbfaa30f7d4fd4d226f08e3bdda16a02c4daf985f9dabfd06da168ca
|
|
| MD5 |
82e609db8bee9a07dba70e1fbfbfaf31
|
|
| BLAKE2b-256 |
d95694cc28acdd32eaf0ba588452848c887177b2e5e712d8cf12164fa318943b
|