Parameter Tampering
Also Known As
parameter manipulation
query string tampering
form field tampering
TL;DR
Modifying HTTP request parameters — query strings, POST fields, cookies, or hidden fields — to manipulate application business logic.
Explanation
Parameter tampering exploits the application's trust in client-supplied values: changing price=10 to price=1 in a POST body, altering a hidden field discount_pct=0 to 100, or editing a cookie with role=user to role=admin. These attacks succeed when the application validates parameter format (is it an integer?) but not legitimacy (is this integer the correct price?). Defences: derive prices, roles, and permissions server-side from authoritative sources; use HMAC-signed tokens for values that must round-trip through the client; never trust the client for security-sensitive state.
Common Misconception
✗ Hidden form fields and URL parameters are safe because users cannot easily see them. They are trivially visible and editable in browser dev tools, curl, or a proxy — never trust client-supplied values for prices, IDs, or permissions.
Why It Matters
Any business logic that trusts client-submitted values like prices, discount amounts, or product IDs can be bypassed by modifying those values in the request.
Common Mistakes
- Storing the price in a hidden form field and trusting it on submission instead of re-fetching from the database.
- Only validating parameters in client-side JavaScript — bypassed by intercepting the request.
- Using sequential integer IDs for private objects without authorisation checks — increment by 1 to access another user's data.
- Not re-validating quantity, price, or discount constraints server-side after any user-modifiable input.
Code Examples
✗ Vulnerable
$price = (float) $_POST['price']; // client controls the price
✓ Fixed
$price = Product::findOrFail((int)$_POST['product_id'])->price; // always from DB
Tags
🤝 Adopt this term
£79/year · your link shown here
Added
15 Mar 2026
Edited
22 Mar 2026
Views
37
🤖 AI Guestbook educational data only
|
|
Last 30 days
Agents 0
No pings yet today
No pings yesterday
Amazonbot 8
Perplexity 8
Google 6
ChatGPT 6
Ahrefs 2
Unknown AI 2
Majestic 1
Also referenced
How they use it
crawler 31
crawler_json 2
Related categories
⚡
DEV INTEL
Tools & Severity
🔴 Critical
⚙ Fix effort: Medium
⚡ Quick Fix
Never trust any client-sent value for price, discount, role, or ownership — recalculate prices server-side, re-fetch roles from DB, and verify ownership on every request
📦 Applies To
any
web
api
🔗 Prerequisites
🔍 Detection Hints
Price or discount from POST/GET used without server-side recalculation; role or permission from hidden form field; cart total from client instead of computed from cart items
Auto-detectable:
✓ Yes
semgrep
owasp-zap
burpsuite
⚠ Related Problems
🤖 AI Agent
Confidence: High
False Positives: Medium
✗ Manual fix
Fix: Medium
Context: Function
Tests: Update
CWE-472
CWE-20