Windfall
Windmill Path Traversal → Credential Leak → Remote Code Execution
Windfall (n.): An unexpected, unearned, or sudden gain or advantage, exactly what attackers get from this vulnerability.
| Property |
Value |
| Name |
Windfall |
| CVE (Path Traversal) |
CVE-2026-29059 (Windmill & Nextcloud Flow) |
| CVE (SQLi) |
CVE-2026-23696 (Windmill & Nextcloud Flow) |
| CVE (Operator Bypass) |
CVE-2026-22683 (Windmill & Nextcloud Flow) |
| Affected (Path Traversal) |
Windmill v1.309.0 – v1.603.2, Nextcloud Flow v1.0.0 – v1.2.2 |
| Affected (SQLi) |
Windmill v1.276.0 – v1.603.2, Nextcloud Flow v1.0.0 – v1.2.2 |
| Fixed |
Windmill v1.603.3, Nextcloud Flow v1.3.0 |
| Disclosed |
2026-01-10 |
| Credit |
Chocapikk |
CVSS 4.0 Scores
Key factors:
- Windmill standalone: Unauthenticated (PR:N), Docker socket often mounted → host escape (SC/SI/SA:H)
- Nextcloud Flow (proxy): Also unauthenticated! The vulnerable
jobs_u endpoint is access_level=0 (PUBLIC) in Flow's route table
- SQLi: Requires Windmill account (PR:L), but any operator can escalate to super_admin → RCE
Summary
Two critical vulnerabilities in Windmill:
- Unauthenticated Path Traversal: Read arbitrary files, leak credentials, achieve RCE
- Authenticated SQL Injection: Exfiltrate any data from Windmill's PostgreSQL database
About This Exploit
This wasn't supposed to be this big.
What started as a simple PoC quickly evolved into a full exploitation framework. I had the opportunity to push the boundaries and see how far I could go in terms of technical sophistication.
How it was built: This exploit was developed through a collaborative workflow with AI assistance. I provided prompts and architectural guidance, while the AI generated the actual code. This allowed me to focus on the "what" and "why" (attack chains, OPSEC requirements, edge cases) while the AI handled the "how" (implementation details, protocol specifications, error handling).
The result is a production-grade framework with:
- Auto-detection of deployment types (Standalone / Flow Direct / Flow Proxy)
- Multiple credential leak methods with automatic fallbacks
- Raw PostgreSQL protocol implementation (SCRAM-SHA-256 from scratch)
- Self-destruct cleanup using
WM_JOB_ID (zero forensic evidence)
- Modular architecture for extensibility
- Blind mode support when endpoints are blocked
This demonstrates what's possible when you have the chance to push technical limits. The exploit works in all scenarios, handles edge cases gracefully, and includes advanced OPSEC techniques that go beyond typical PoCs.
Why so sophisticated? Because I could. This was a test of how far we can push exploitation tooling when given the opportunity to build something properly rather than just "making it work". It's also a demonstration of AI-assisted development: with the right prompts and architectural vision, AI can generate production-quality offensive tooling.
Impact
| Vector |
Windmill Standalone |
Flow (Direct) |
Flow (Proxy) |
| File Read |
✅ Unauthenticated |
✅ Unauthenticated |
✅ Unauthenticated! |
| Credential Leak |
⚠️ SUPERADMIN_SECRET (optional) |
✅ JSON config + PostgreSQL |
✅ JSON config + PostgreSQL |
| PostgreSQL Leak |
⚠️ Separate container (Docker) |
✅ Same container |
✅ Same container |
| Container RCE |
✅ Root (if secret configured) |
✅ Root |
✅ Root |
| Host Escape |
✅ Via Docker socket |
❌ |
❌ |
⚠️ Critical Discovery: The vulnerable jobs_u endpoint is registered with access_level=0 (PUBLIC) in Flow's AppAPI route table. This means no Nextcloud authentication is required to exploit the path traversal via the Nextcloud proxy! Flow deployments are just as vulnerable as standalone Windmill.
Attack Chain
┌─────────────────────────────────────────────────────────────────────────┐
│ WINDFALL │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌──────────────────┐ ┌─────────────┐ │
│ │ Path │ │ Credential │ │ Remote Code │ │
│ │ Traversal │───▶│ Leak │───▶│ Execution │ │
│ │ (Unauth) │ │ │ │ (Root) │ │
│ └─────────────┘ └──────────────────┘ └─────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ /etc/passwd 3 Methods: Container RCE │
│ /proc/environ ├─ windmill_users_config.json (Flow) │
│ PostgreSQL files ├─ SUPERADMIN_SECRET (/proc/1/environ) │
│ └─ PostgreSQL files → jwt_secret → forge JWT │
│ │
├─────────────────────────────────────────────────────────────────────────┤
│ PostgreSQL Data Leak (when DB in same container): │
│ │
│ /proc/*/cmdline ──▶ postgres -D /path ──▶ base/*/files ──▶ jwt_secret │
│ │ │
│ ▼ │
│ Forge JWT → RCE │
└─────────────────────────────────────────────────────────────────────────┘
Exploits
| Exploit |
Description |
Auth Required |
| windfall_afr.py |
Path Traversal → Token Leak → RCE |
❌ None (all deployments unauth) |
| windfall_sqli.py |
SQLi → JWT Forge → Privesc → RCE |
Operator account (+ NC creds for proxy) |
| windfall_nc_pivot.py |
Path Traversal → APP_SECRET → NC Admin |
❌ None (same path traversal) |
Credential Leak Methods (windfall_afr.py)
The path traversal exploit tries multiple methods to obtain credentials:
| Priority |
Method |
Target |
Works On |
| 1 |
windmill_users_config.json |
/nc_app_flow_data/... |
Nextcloud Flow |
| 2 |
SUPERADMIN_SECRET |
/proc/1/environ |
Standalone (if configured) |
| 3 |
PostgreSQL files |
/proc → pg_data → jwt_secret |
Same container (Flow) |
Both exploits auto-detect deployment type and adapt accordingly:
| Deployment |
Path Traversal |
SQLi |
| Windmill Standalone |
✅ Unauthenticated |
✅ Operator → Super Admin |
| Nextcloud Flow (Direct) |
✅ Unauthenticated |
✅ Operator → Super Admin |
| Nextcloud Flow (Proxy) |
✅ Unauthenticated! |
⚠️ Operator → Super Admin (NC creds REQUIRED) |
Note: Flow's vulnerable jobs_u endpoint is access_level=0 (PUBLIC) in the AppAPI database, meaning the proxy passes requests without checking Nextcloud credentials. No Nextcloud authentication is required for path traversal. However, SQLi via proxy REQUIRES Nextcloud credentials because endpoints like /api/auth/login and /api/w/*/folders/* are blocked without Nextcloud authentication.
Test Results
All 6 scenarios tested and confirmed:
╔═══════════════════════════════════════════════════════════════════════════════════╗
║ WINDFALL TEST RESULTS ║
╠═══════════════════════════════════════════════════════════════════════════════════╣
║ # │ Exploit │ Deployment │ Auth Required │ Result ║
╠═══════════════════════════════════════════════════════════════════════════════════╣
║ 1 │ windfall_afr │ Flow Proxy │ ❌ NONE │ ✅ uid=0(root) RCE ║
║ 2 │ windfall_afr │ Flow Direct │ ❌ NONE │ ✅ uid=0(root) RCE ║
║ 3 │ windfall_afr │ Standalone │ ❌ NONE │ ✅ uid=0(root) RCE ║
║ 4 │ windfall_sqli │ Flow Proxy │ ✅ Windmill + NC │ ✅ uid=0(root) RCE ║
║ 5 │ windfall_sqli │ Flow Direct │ ✅ Windmill │ ✅ uid=0(root) RCE ║
║ 6 │ windfall_sqli │ Standalone │ ✅ Windmill │ ✅ uid=0(root) RCE ║
╠═══════════════════════════════════════════════════════════════════════════════════╣
║ 6/6 TESTS PASSED ║
║ (Note: windfall_afr works unauth on all deployments, no Nextcloud creds needed) ║
║ ║
║ Key findings: ║
║ • Flow Proxy: jobs_u endpoint is PUBLIC (access_level=0) → NO AUTH NEEDED! ║
║ • Credential leak: windmill_users_config.json contains plaintext tokens ║
║ • Detection: Works even when /api/version requires auth (fallback traversal) ║
╚═══════════════════════════════════════════════════════════════════════════════════╝
Quick Start
Path Traversal (Unauthenticated RCE)
# Windmill standalone (auto-detects leak method)
python3 windfall_afr.py http://localhost:8000 -c "id"
# Nextcloud Flow (direct access to Windmill container)
python3 windfall_afr.py http://<flow-container-ip>:8000 -c "id"
# Nextcloud Flow (via proxy - NO auth required! jobs_u is PUBLIC)
python3 windfall_afr.py https://nextcloud.example.com -c "id"
# Interactive shell
python3 windfall_afr.py http://localhost:8000
# Read arbitrary file
python3 windfall_afr.py http://localhost:8000 -r /etc/passwd
# Leak credentials only (no RCE)
python3 windfall_afr.py http://localhost:8000 --leak-users
# Force PostgreSQL file leak method (jwt_secret → forge JWT)
python3 windfall_afr.py http://<flow-container-ip>:8000 --leak-postgres
# Host escape (Docker socket)
python3 windfall_afr.py http://localhost:8000 -H
# Execute command on host
python3 windfall_afr.py http://localhost:8000 --host-cmd "id"
# Ghost mode: DELETE all job traces from database (zero forensic evidence)
python3 windfall_afr.py http://localhost:8000 -c "id" --clean
SQLi Privilege Escalation (Operator → Super Admin → RCE)