# Modify in-flight data to payment provider Smart2Pay

Signature hash concatenated field names/values without delimiters, letting a crafted email inject an extra amount parameter to pay $1 for a large Steam wallet top-up.

- Payout: $7,500
- Severity: critical
- Program: Valve
- Found by: drbrix
- Disclosed: 2021-08-10
- Write-up quality: 8/10
- Original: https://hackerone.com/reports/1295844
- Library page: https://bugbountylibrary.com/r/h1%3A1295844
- Tags: area:web domain:web impact:funds-loss impact:integrity kind:bounty platform:hackerone sev:critical tech:payment technique:chained technique:param-pollution vuln:business-logic vuln:fee-bypass

**Target:** Smart2Pay payment gateway POST / (globalapi.smart2pay.com) via Steam add-funds flow
**Root cause:** The Hash signature is computed over concatenated field names and values with no separators, so moving characters between adjacent fields (Amount and CustomerEmail) preserves the hash string while changing the parsed parameters.
**Steps:**
1. Set Steam account email to `brixamount100abc@example.com` (embeds `amount100`).
2. Start add-funds on store.steampowered.com, choose a Smart2Pay method (przelewy24), proceed to payment.
3. Intercept POST to `https://globalapi.smart2pay.com/` containing `Amount=2000...&CustomerEmail=brixamount100abc%40...&Hash=...`.
4. Rewrite `Amount=2000` to `Amount2=000` and `CustomerEmail=brixamount100abc%40...` to `CustomerEmail=brix&amount=100&ab=c%40...` so concatenation still yields `Amount2000`.
5. Forward request; pay the small amount and receive the larger wallet credit.
**How found:** Noticed the Hash was a plain concatenation of all field names and values without delimiters, then realized a user-controlled field (email) adjacent to Amount could absorb characters to relocate the amount value while keeping the hash input identical.
**Exploitation:** Attacker controls their account email, which is reflected into the signed CustomerEmail field. By splitting the original `Amount2000` string across the renamed `Amount2` field and an injected `amount=100` parameter inside the email value, the concatenated hash input is unchanged and the signature validates, while the payment provider parses a new amount. Paying the small amount credits the larger Steam wallet balance.
**Escalation:** Repeatable to generate arbitrary wallet balance, enabling market manipulation and cheap game-key resale.
**Insight:** When a signature is hash(concat(names+values)) with no separators, look for any user-controlled field adjacent to a sensitive numeric field; shifting characters across the boundary (e.g. Amount=2000 -> Amount2=000 + injected amount=100) preserves the signed string but changes parsed semantics.

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

**Modified Smart2Pay request with injected amount field**

```
MerchantID=1102&MerchantTransactionID=██████&Amount2=000&Currency=PLN&ReturnURL=https%3A%2F%2Fstore.steampowered.com%2Fpaypal%2Fsmart2pay%2F████%2F&MethodID=12&Country=PL&CustomerEmail=brix&amount=100&ab=c%40██████████&CustomerName=_drbrix_&SkipHPP=1&Description=Steam+Purchase&SkinID=101&Hash=█████████
```

**Original signed Smart2Pay POST request**

```
MerchantID=1102&MerchantTransactionID=███&Amount=2000&Currency=PLN&ReturnURL=https%3A%2F%2Fstore.steampowered.com%2Fpaypal%2Fsmart2pay%2F████%2F&MethodID=12&Country=PL&CustomerEmail=brixamount100abc%40███████&CustomerName=_drbrix_&SkipHPP=1&Description=Steam+Purchase&SkinID=101&Hash=███
```

