Skip to content
Business logic Write-up Beginner

#SecurityBreach — ”How I was able to book hotel room for 1.50₹!”

The hotel booking website allowed a user to modify the booking amount in an API request, so a room could be booked for a very low price. An attacker could pay a minimal amount and still complete a booking.

Hariom Vashisth Follow

Published on medium.com

{{media:0}}

Hariom Vashisth, on medium.com

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

This is a write-up about a hotel booking website based in India, aimed at both married and unmarried couples, which handles room bookings in more than 40 Indian cities. The feature under examination is the booking flow itself: the site is a custom-built, API-driven web application, and the price of a room is submitted to the backend through an API call made by the browser.

The author's stated goal was to book a room while paying a minimal amount. The invoice for the resulting booking is shown at the start of the write-up.

Invoice

Setup

The prerequisites were deliberately minimal: the author states that nothing more is needed than the researcher themselves. The tools used were:

  1. Postman, installed as a Chrome app.
  2. Postman Interceptor, the Chrome extension that lets Postman capture requests made by the browser.
  3. Google Chrome.

The author's prospect identification criteria for choosing a target were: a custom-made web application, an API-driven methodology, and a CORS misconfiguration. All three applied here.

Finding it

The researcher opened the site (referred to in the write-up as example.com), went to the Network tab of Chrome's developer tools and monitored the XHR traffic while browsing.

Image for post
chrome console -> Network Tab From the original on medium.com

chrome console -> Network Tab

After choosing a hotel, the hotel page looks like this before any manipulation:

Image for post
Hotel Page — Before From the original on medium.com

Hotel Page, Before

Monitoring the Network tab reveals how the site processes input data through its API. The author notes that CORS was set to *, which is what allowed the experimentation through Postman. The author flags the wildcard CORS setting as the weakness that made the tampering possible.

Exploitation

Step 1: Capture the booking API call

With the Network tab open, the researcher selected a hotel and captured the booking API call using Postman Interceptor, so that the request could be replayed outside the browser.

Step 2: Change the booking amount

The captured request was modified in Postman to change the booking amount, and then sent. After changing the booking amount, the author paid a minimal amount for the booking. The author's summary of the outcome is to pay a minimal amount and enjoy the day; the title records the amount actually paid as 1.50₹.

Step 3: Cancel the booking

The author cancelled the booking, since it was only a proof of concept.

Root cause

The author attributes the issue to a CORS misconfiguration that allowed the booking amount to be changed through Postman. The CORS setting of * is what the author credits for being able to experiment through Postman. The write-up does not describe any server-side check that would have caught the mismatch between the submitted amount and the room price.

Impact

The author was able to book a room while paying a minimal amount, recorded in the title as 1.50₹. The author frames the wider risk in terms of trust: a booking platform that fails to keep details confidential and lets prices be tampered with damages users' faith in such sites. The write-up does not quantify how many bookings or users could be affected.

Fix

The report does not describe any code change or fix applied by the vendor.

Disclosure

The vulnerability was found on Mar 25, the POC was ready on Mar 27, and it was reported on Mar 28. The author contacted the tech team by email; the write-up shows the reporting email.

Reporting Vulnerability through Email

The author contacted them again, motivated by the users of the platform rather than by reward or recognition. The vendor then began working on the report. The investigation report arrived on Apr 24 from a "cyber vulnerability investigation" Manager, who also offered a reward for the author's time and a security audit proposal. The bounty was rewarded on May 08.

Variants to test

  1. Client-supplied price fields. Capture the booking or checkout request and change the amount, quantity or currency field. A positive result is a booking confirmation whose charged total differs from the listed price.
  2. Wildcard CORS on authenticated APIs. Check whether Access-Control-Allow-Origin: * (or a reflected origin with credentials allowed) is returned on endpoints that carry session state. A positive result is a cross-origin script reading authenticated responses.
  3. Other client-trusted totals. Apply the same tampering to discounts, coupon values, taxes, fees and loyalty points. A positive result is any total that the server accepts without recalculating it.
  4. Replay after capture. Replay a captured request with Postman Interceptor after changing only the price, keeping everything else identical. A positive result confirms the server trusts the submitted body rather than its own records.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

What happened, in plain words

A security researcher found that a hotel booking website in India let him change the price of a room before the booking was confirmed. The site was built to serve both married and unmarried couples and handled bookings in more than 40 Indian cities. By monitoring XHR traffic in the Network tab, he captured the API call with Postman Interceptor and changed the booking amount. The booking went through at a tiny price, and the title of his write-up records the amount he paid as 1.50₹. He cancelled the booking afterwards because it was only a proof of concept, a demonstration that the problem was real rather than an attempt to get a cheap room.

The invoice for that booking is shown at the start of the write-up.

Invoice

To follow the rest of this article you only need a computer and a browser. Every tool mentioned is either a browser feature or a free add-on for the browser, and every concept is explained the first time it appears.

The target and why it was chosen

The site is a custom-made web application. That means it was written specifically for this business rather than assembled from an off-the-shelf product, so any weakness in it is the business's own code rather than something a vendor might patch for everyone at once. It is also API-driven: the pages you see are mostly a shell, and the real work of showing hotels, prices and bookings is done by the browser asking a separate backend service for data. An API, short for application programming interface, is simply the set of addresses and rules a program uses to talk to another program. Think of a restaurant: the menu and the waiter are the API, and the kitchen is the backend. You never walk into the kitchen yourself; you tell the waiter what you want and the waiter carries it back.

The author's criteria for picking a target were three: a custom-made web application, an API-driven design, and a CORS misconfiguration. All three were present here. CORS is explained in detail further down, where it first matters.

The tools

The setup was deliberately small. The author says the only prerequisite is you, the real you. The tools were:

  1. Postman, installed as a Chrome app. Postman is a program for building and sending requests to a web service by hand, without a website's buttons and forms in the way. If the browser is ordering through the waiter, Postman lets you walk up to the counter and hand over a note yourself.
  2. Postman Interceptor, a Chrome extension that lets Postman capture requests the browser makes. Without it you would have to retype every request from scratch; with it, you record what the site already sent and then edit a copy.
  3. Google Chrome.

Finding it

The researcher opened the site, which the write-up calls example.com, opened the Network tab of Chrome's developer tools, and watched the XHR traffic while browsing. The Network tab is a panel built into Chrome that lists every request the page makes and every response it gets back. XHR stands for XMLHttpRequest, the browser mechanism that lets a page fetch data in the background without reloading. In the Network tab those background fetches appear as a stream of entries, and each entry is one conversation with the API.

Image for post
chrome console -> Network Tab From the original on medium.com

chrome console -> Network Tab

He then chose a hotel. Before any manipulation, the hotel page looked like this:

Image for post
Hotel Page — Before From the original on medium.com

Hotel Page, Before

Watching the Network tab is how you learn how the site processes the data you type in: which request carries the hotel choice, which carries the dates, and, crucially, which carries the price. The key observation was the CORS configuration. The author notes that CORS was set to *.

CORS, cross-origin resource sharing, is a rule that browsers enforce about which websites may read responses from which other websites. An origin is the combination of scheme, host and port, so https://shop.example and https://bank.example are different origins even though both are on the web. By default a browser will not let a script running on one origin read a response from another, because otherwise any page you visit could quietly pull data from your bank or your webmail using your logged-in session. CORS is the mechanism by which a server can say "these other origins are allowed to read my responses". The header Access-Control-Allow-Origin is the server's answer to that question, and * is the wildcard meaning "any origin at all".

The author flags the wildcard CORS setting as the weakness that made the tampering possible.

Exploitation

Step 1: Capture the booking API call

With the Network tab open, the researcher selected a hotel and captured the booking API call using Postman Interceptor, so the request could be replayed outside the browser. Capturing means recording the exact request the browser sent: the address, the headers and the body. Headers are the small labelled lines that travel with every request, carrying things like what kind of data is being sent. The body is the actual content, in this case the details of the booking. Once you have a copy, you can send the same request again as many times as you like, changing one thing at a time.

Step 2: Change the booking amount

The captured request was modified in Postman to change the booking amount, and then sent. After changing the booking amount, the author paid a minimal amount for the booking. Client here means the browser, the side you control; server means the backend, the side the business controls. The author's summary of the outcome is to pay a minimal amount and enjoy the day, and the title records the amount actually paid as 1.50₹.

Step 3: Cancel the booking

The author cancelled the booking, since it was only a proof of concept. A proof of concept is a minimal demonstration that a weakness is real and exploitable, done without causing harm or taking advantage.

Root cause

The author attributes the issue to a CORS misconfiguration that allowed the booking amount to be changed through Postman. In plain terms: the kitchen cooked whatever price the customer wrote on the order slip, instead of checking the menu. The CORS setting of * is what the author credits for being able to experiment through Postman. The write-up does not describe any server-side check that would have caught the mismatch between the submitted amount and the room price.

Impact

The author was able to book a room while paying a minimal amount, recorded in the title as 1.50₹. The author frames the wider risk in terms of trust: a booking platform that fails to keep details confidential and lets prices be tampered with damages users' faith in such sites. The write-up does not quantify how many bookings or users could be affected.

Fix

The report does not describe any code change or fix applied by the vendor. An allowlist is the opposite of a wildcard: instead of "anyone", it names the specific origins that are permitted.

Disclosure

The vulnerability was found on Mar 25, the POC was ready on Mar 27, and it was reported on Mar 28. The author contacted the tech team by email; the write-up shows the reporting email.

Reporting Vulnerability through Email

The author contacted them again, motivated by the users of the platform rather than by reward or recognition. The vendor then began working on the report. The investigation report arrived on Apr 24 from a "cyber vulnerability investigation" Manager, who also offered a reward for the author's time and a security audit proposal. The bounty was rewarded on May 08.

Variants to test

If you want to look for the same class of problem on a site you are allowed to test, these are the directions the write-up lists.

  1. Client-supplied price fields. Capture the booking or checkout request and change the amount, quantity or currency field. A positive result is a booking confirmation whose charged total differs from the listed price.
  2. Wildcard CORS on authenticated APIs. Check whether Access-Control-Allow-Origin: *, or a reflected origin with credentials allowed, is returned on endpoints that carry session state. A session is the server's memory of who you are after you log in, usually held in a cookie, which is a small piece of data the browser stores and sends back with each request. A positive result is a cross-origin script reading authenticated responses.
  3. Other client-trusted totals. Apply the same tampering to discounts, coupon values, taxes, fees and loyalty points. A positive result is any total that the server accepts without recalculating it.
  4. Replay after capture. Replay a captured request with Postman Interceptor after changing only the price, keeping everything else identical. A positive result confirms the server trusts the submitted body rather than its own records.

Glossary

  • API: the set of addresses and rules one program uses to talk to another; the waiter between your browser and the backend.
  • API-driven: a site whose pages get their data by calling an API rather than having everything baked into the page.
  • Backend: the server-side part of a system that the business controls and the user does not see.
  • Body: the content of a request, as opposed to its address and headers.
  • Bounty: a reward paid for reporting a security problem.
  • Client: the side you control, normally your browser.
  • Cookie: a small piece of data a site stores in your browser and which the browser sends back with later requests.
  • CORS: cross-origin resource sharing, the browser rule and server headers that decide which other origins may read a response.
  • Access-Control-Allow-Origin: the response header in which a server states which origins may read its responses; * means any origin.
  • Custom-made web application: software written specifically for one business rather than bought off the shelf.
  • Developer tools / Network tab: the panel built into Chrome that lists every request and response a page makes.
  • Endpoint: a specific address on an API that performs one job, such as creating a booking.
  • Header: a small labelled line travelling with a request or response, carrying metadata such as the data type.
  • Origin: the combination of scheme, host and port that identifies a website for browser security purposes.
  • Postman: a program for building and sending requests to a web service by hand.
  • Postman Interceptor: a Chrome extension that lets Postman capture requests made by the browser.
  • Proof of concept (POC): a minimal demonstration that a weakness is real, done without causing harm.
  • Request / response: one message sent to a server, and the message it sends back.
  • Server: the machine and software that hold the data and answer requests.
  • Session: the server's memory of who you are after you log in.
  • Wildcard: a symbol, here *, meaning "anything" or "anyone".
  • XHR: XMLHttpRequest, the browser mechanism for fetching data in the background without reloading the page.

More by Hariom Vashisth

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.