Steam Access Control Bug: The Zero That Leaked Keys
*AI-assisted: drafted with AI help from public sources, then reviewed and edited. This is an analytical case study of a public disclosure, not my own discovery.*


AI-generated illustration
A $20,000 Valve bounty: Steam’s partner portal checked key ownership, until a request asked for zero keys and got a whole key set
AI-assisted: drafted with AI help from public sources, then reviewed and edited. This is an analytical case study of a public disclosure, not my own discovery.
One number turned a developer portal into a vending machine for other studios’ game keys. In 2018, Artem Moskowsky found a Steam access control bug in Valve’s partner site: asking to download zero keys skipped the ownership check and returned an entire key set, in one test 36,000 Portal 2 keys. Valve fixed it within days and paid $20,000.
Disclaimer: * Educational and defensive use only. This was fixed in August 2018. Reproduction details are intentionally omitted.*
Vulnerability Overview
- Type: Improper access control (source-reported weakness) on a key-download function, reachable by any authenticated partner
- CWE (analytical mapping, not from the source): CWE-284 (Improper Access Control), CWE-639 (Authorization Bypass Through User-Controlled Key)
- CVE: None (hosted service)
- Severity/Bounty: Critical (HackerOne report rating). Bounty: $20,000 ($15,000 bounty plus a $5,000 bonus)
How the Steam Access Control Bug Worked (high level)
Steam’s partner portal lets developers generate and download activation keys for their games. A download request named a key set and how many keys to take.
Other studios’ key-set IDs returned an error saying he had no assignment for that set. Ownership was being checked. Then he changed the quantity to zero. The check vanished, and the server returned the full contents of the set.
Valve has not published the root cause. A plausible reading is that the ownership test lived inside the “assign N keys” branch, and a count of zero took a different path that went straight to export. That is a classic authorization bug: the check exists, but not on every path to the data.
With key-set IDs guessable and, per the researcher, more than 430,000 sets in existence, one partner account could in principle have pulled every key Steam developers had ever generated.
Business Impact
Steam keys are money: leaked keys get resold on grey markets, and each activation is a lost sale. Valve reports that audit logs still recorded these requests, and that reviewing them showed no prior or ongoing exploitation.
Timeline from the report: submitted and triaged on 7 August 2018, rewarded and resolved on 11 August, publicly disclosed on 31 October.
Fixing Steam-Style Access Control Bypasses (my own analysis)
1. Authorize first, unconditionally. Ownership is checked before any parameter decides which code path runs.
2. Treat edge values as invalid, not special. Zero, negative, empty and huge counts should fail validation, not mean “everything”.
3. Keep the audit trail. It let Valve rule out abuse.
# Pseudocode: ownership check runs before the quantity can choose a code path
def download_keys(session, key_set_id, count):
key_set = key_sets.get(key_set_id)
if key_set is None or not partner_owns_app(session.partner_id, key_set.app_id):
audit("key_download_denied", session.partner_id, key_set_id)
return deny("not_found") # same answer for missing or foreign
if type(count) is not int or count < 1 or count > MAX_KEYS_PER_REQUEST:
return reject("invalid_count") # 0 is not a shortcut for "all"
keys = key_sets.allocate(key_set.id, session.partner_id, count) # atomic, marks delivered
audit("key_download", session.partner_id, key_set.id, len(keys))
return keys
# Test: foreign set with count=0 -> not_found; own set with count=0 -> invalid_count
Key Takeaways
- An authorization check that only runs on some branches is a bypass waiting for the right input.
- Boundary values (0, -1, empty) belong in every access-control test plan.
Credit & Sources
Found by Artem Moskowsky (HackerOne: moskowsky). Primary sources: HackerOne report #391217, Getting all the CD keys of any game (Valve’s summary, timeline, rating and reward) and the researcher’s own write-up on Habr (1 October 2018, in Russian): ownership error, zero-count bypass, 36,000-key example and set count. Facts come from those sources; analysis and code are original.
Next breakdown: another real bug bounty case. Follow @masimshahzad for daily bug bounty breakdowns.
First published by Adam Hale on Medium.
Sources
Share
Reactions
Comments
Your name and comment appear on this article for other readers.
Corrections and tips:[email protected]

