Authorization disclaimer. This walkthrough is limited to the intentionally vulnerable PortSwigger Web Security Academy lab linked below. Test only systems you own or are explicitly authorized to assess.
Overview
The product page calls GET /api/products/1/price, but the route also accepts an unused PATCH method. An ordinary user can submit {"price":0} and then order the jacket for $0.00.

Lab objective/setup
Sign in as wiener, browse product 1, and inspect the price request. The target route is /api/products/1/price; the objective is to identify its unadvertised write method, set the price to zero, and place the order.
What I observed
Burp history shows the storefront reading /api/products/1/price. Unsupported-method responses disclose Allow: GET, PATCH, while a bare PATCH reaches content-type validation instead of method rejection.



Why it is vulnerable
Removing a feature from the client does not remove the underlying API capability; authorization and validation must be enforced by the endpoint itself.
Walkthrough in the authorized PortSwigger lab
- Capture
GET /api/products/1/priceand send it to Repeater. - Try
POSTandPUT; both return405withAllow: GET, PATCH. - Try
PATCH; the content-type error confirms that the handler exists and expects JSON. - Send
PATCH /api/products/1/pricewithContent-Type: application/jsonand{"price":0}. - Verify the
$0.00product price, add the jacket to the cart, and place the order.
1 | POST /api/products/1/price → 405 Method Not Allowed |
1 | Content-Type: application/json |





Verification
After the zero-price jacket order is placed, the Academy changes the lab state to solved.

Impact and defensive lesson
An unused client feature can remain a live server-side privilege boundary. Inventory every method on every deployed route, require administrative authorization for catalog changes, validate writable fields, and test operations that the current UI does not call.