How I Snagged a $$$ P1: PayU Key + Salt + Hash Revealed in a Hosp
The payment endpoint returned the PayU merchant key, salt, and hash in the HTTP response to the browser. An attacker could use these secrets to forge payment requests, alter amounts, or mark payments as completed without paying.
While testing a hospital’s online payment system as part of a private bug bounty program, I found something very serious.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server generated the payment hash and included the merchant key and salt in the JSON response to the client instead of keeping them server-side.
Impact
An attacker could create fake payment requests, change the payment amount, or reuse the hash for other transactions, potentially paying a small amount instead of the full price or marking payments as completed without paying.
What the attacker needed
Access to the payment page; ability to intercept HTTP traffic
The fix
The server should never send the key, salt, or hash to the frontend, and the hash should only be generated server-side; the team also rotated the key and salt after fixing.
How it was found
- Open the payment page.
- Fill the form with valid data such as name, amount, and email.
- Click Pay while intercepting the request with a proxy tool.
- Inspect the response to the POST request to the deposit endpoint.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you pay online, the payment provider uses a secret code to check that the request really came from the shop and was not tampered with. Here the shop's website sent that secret code to your browser, where anyone can read it. With the secret, a person could pretend to be the shop and create fake payment messages.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.