| Title | Sipeed PicoClaw <= 0.2.9 Cross-Site Request Forgery (CWE-352) |
|---|
| Description | # Technical Details
A Cross-Site Request Forgery vulnerability exists in the launcher first-run password setup route in `web/backend/middleware/launcher_dashboard_auth.go` and `web/backend/api/auth.go` of PicoClaw.
The application fails to validate browser provenance headers such as `Origin`, `Referer`, or `Sec-Fetch-Site` on unauthenticated `POST /api/auth/setup` requests during first-run initialization.
# Vulnerable Code
File: `web/backend/middleware/launcher_dashboard_auth.go`
Method: `isPublicLauncherDashboardPath`
Why: Classifies `POST /api/auth/setup` as a public route and bypasses session enforcement.
File: `web/backend/api/auth.go`
Method: `handleSetup`
Why: Allows unauthenticated password initialization when the store is uninitialized and persists the supplied password without CSRF provenance checks.
File: `web/backend/dashboardauth/store.go`
Method: `SetPassword`
Why: Stores the attacker-controlled password hash into the launcher authentication database.
# Reproduction
1. Start a fresh PicoClaw launcher instance with no dashboard password configured.
2. From a malicious web page, send a cross-site POST to `http://127.0.0.1:<port>/api/auth/setup`.
3. Include headers such as `Origin: https://evil.example` and an attacker-chosen password body.
4. Observe `HTTP 200 {"status":"ok"}` and `/api/auth/status` changing from `initialized:false` to `initialized:true`.
5. Run the same request after initialization and observe it is rejected, confirming the vulnerable branch is first-run setup.
# Impact
- Allows a malicious website to preempt first-run launcher setup.
- Lets an attacker set the dashboard password and take over the local launcher control plane.
- Exposes gateway lifecycle controls, configuration management, provider credentials, tool configuration, and other privileged launcher APIs. |
|---|
| Source | ⚠️ https://github.com/sipeed/picoclaw/issues/3072 |
|---|
| User | Eric-i (UID 97584) |
|---|
| Submission | 06/09/2026 13:29 (2 months ago) |
|---|
| Moderation | 07/17/2026 15:50 (1 month later) |
|---|
| Status | Accepted |
|---|
| VulDB entry | 379793 [Sipeed PicoClaw up to 0.2.9 web/backend/api/auth.go cross-site request forgery] |
|---|
| Points | 20 |
|---|