Course contentsShow
← Security
Lesson 923 of 3,05219. Web Security - Business Logic VulnerabilitiesFree lesson

Payment Amount Tampering

Intercepting and modifying payment amounts in client-side forms, hidden fields, and API requests before submission.

Payment Amount Tampering

What you'll learn: How attackers intercept and modify payment amounts before they reach the server, turning a 100purchaseintoa100 purchase into a 1 charge.

What Is Payment Amount Tampering?

Payment amount tampering occurs when an attacker modifies the price, quantity, or total amount of a transaction after the client has presented it but before the server finalizes the payment. This typically happens through intercepting and altering data in HTML forms, hidden fields, JavaScript variables, or API requests.

Think of it like changing the price tag on an item at checkout while the cashier isn't looking—except in web applications, it's done digitally through browser tools or proxy software.

How It Works

Attackers exploit trust in client-side data. Common attack vectors include:

  • Hidden form fields: Modifying <input type="hidden" name="price" value="99.99"> to a lower value
  • JavaScript variables: Altering price variables before form submission
  • API request payloads: Intercepting POST/PUT requests with tools like Burp Suite and changing JSON or form data before it reaches the server
  • URL parameters: Tampering with GET requests containing price information

For example, an attacker might intercept this API request:

POST /api/checkout
{"item_id": 123, "quantity": 1, "price": 99.99}

And change it to:

{"item_id": 123, "quantity": 1, "price": 0.01}

If the server trusts the client-supplied price instead of looking it up independently, the attacker pays a penny for a $99 item.

Why It Happens

This vulnerability exists when developers fail to validate payment amounts server-side, relying instead on client-submitted data. The server should always recalculate prices based on authoritative sources (database lookups) rather than trusting any client input.

Key Takeaway: Never trust client-side payment data—always recalculate prices, taxes, and totals on the server using authoritative data sources before processing transactions.