# Ability to perform various POST requests on quantopian.com as a different user - insecure by design.

WebSocket form-update let a collaborator inject a path-traversal value into the algo-id DOM element, so the victim's own 'Build algorithm' click issued arbitrary authenticated POST requests.

- Payout: $1,050
- Severity: low
- Program: Quantopian
- Found by: irisrumtub
- Disclosed: 2022-12-21
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/837328
- Library page: https://bugbountylibrary.com/r/h1%3A837328
- Tags: area:web domain:web impact:ato impact:integrity kind:bounty platform:hackerone sev:low tech:websocket technique:chained vuln:access-control vuln:business-logic

**Target:** Algorithm collaboration WebSocket + /algorithms/{id}/validate endpoint
**Root cause:** The form-update WebSocket event writes attacker-controlled values into any DOM element with a value attribute, and the Build Algorithm button reads algo-id from the DOM and interpolates it into the request URL without validation, allowing path traversal and query injection.
**Steps:**
1. Join an algorithm collaboration room with the victim.
2. Send WS `{"type":"form-update","element":"#algo-id","value":"/../../../../../users/update_preferences?prefs%5Bsend_login_detected_email%5D=false","clientId":"x","roomId":"<room>"}`.
3. Victim clicks 'Build algorithm', issuing POST to the traversed path with attacker params.
4. For profile rename use value `/../../../../../users/update_profile?firstname=h1&lastname=test&bio=hi#`.
5. For forum actions use `/posts/delete_post` or `/posts/submit_reply` with public post IDs.
**How found:** Noticed Build Algorithm reads algo-id from DOM into the URL, then fuzzed the form-update WS event and discovered it can set any element's value across collaborators' pages; combined with knowledge that URL params override body and that `../` traversal works.
**Exploitation:** Attacker in a collaboration room pushes a crafted form-update over WebSocket that sets the #algo-id element to a traversal path with query params. When the victim clicks Build Algorithm, the browser sends an authenticated POST to the attacker-chosen endpoint (URL params take precedence over body), performing actions as the victim with no attacker trace.
**Escalation:** Chained DOM injection + path traversal + query-param precedence to convert a UI-only field into arbitrary authenticated POST execution; enumerated rename, notification disable, forum delete/comment.
**Insight:** When a client-side button reads a DOM attribute to build a request URL, look for any cross-user channel (WebSocket, shared state, collaboration) that can mutate that DOM node — then test whether path traversal plus query-string precedence lets you redirect the request to a different authenticated endpoint.

## Proof of concept (copied exactly from the original report)

**WebSocket form-update payload injecting path traversal into algo-id**

```
{"type":"form-update","element":"#algo-id","value":"/../../../../../users/update_preferences?prefs%5Bsend_login_detected_email%5D=false","clientId":"x","roomId":"5ce6e50b298f7c6e0acb68c6"}
```

**WebSocket payload renaming victim via update_profile**

```
{"type":"form-update","element":"#algo-id","value":"/../../../../../users/update_profile?firstname=h1&lastname=test&bio=hi#","clientId":"x","roomId":"5ce6e50b298f7c6e0acb68c6"}
```

**WebSocket form-update setting arbitrary element value**

```
{"type":"form-update","element":"#algo-id","value":"hello","clientId":"x","roomId":"5ce6e50b298f7c6e0acb68c6"}
```

