> For the complete documentation index, see [llms.txt](https://kunalwalavalkar.gitbook.io/write-ups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kunalwalavalkar.gitbook.io/write-ups/portswigger-labs/server-side-topics/business-logic-vulnerabilities/high-level-logic-vulnerability.md).

# High-level logic vulnerability

<figure><img src="/files/OIcnYvJEKansBwGjsUZu" alt=""><figcaption></figcaption></figure>

Let's click on the `My account` button and login using the following credentials:

| Username | Password |
| -------- | -------- |
| wiener   | peter    |

<figure><img src="/files/If4uOloLpbsnW72g3Vpz" alt=""><figcaption></figcaption></figure>

Now we can add the "Lightweight l33t leather jacket" to our cart.

<figure><img src="/files/o8oNj2NMeUewD2bqvhHQ" alt=""><figcaption></figcaption></figure>

Since we are proxying the traffic through Burp Suite, we can go `Proxy > HTTP History` to view the request.

<figure><img src="/files/R7oXjpGrSISniLCkznfi" alt=""><figcaption></figcaption></figure>

Let's forward this request to the `Repeater` for further modification.&#x20;

Once in the `Repeater`, we can set the `quantity` parameter to the following:

```
-2
```

<figure><img src="/files/Q4ElVHGLHGWRFXRbTGMP" alt=""><figcaption></figcaption></figure>

Let's go back to our cart in the browser.

<figure><img src="/files/AVREPJZ80j34JpQg62XC" alt=""><figcaption></figcaption></figure>

We can see that the `quantity` has gone from 1 to -1 since we set the `quantity` parameter to -2. Also the price is now negative.

Next, we have to set the `quantity` back to 1 and add another product ("The Trolley-ON") to the cart.

<figure><img src="/files/E9KuA7qO1PdICgefUEvP" alt=""><figcaption></figcaption></figure>

We can view this request in the `Proxy > HTTP History` tab.

<figure><img src="/files/K2kwQxQRT38r2VEpXCLY" alt=""><figcaption></figcaption></figure>

Let's forward it to the `Repeater`. Inside the `Repeater` set the `quantity` parameter to the following and send the request:

```
-22
```

<figure><img src="/files/ltlBp5h53wmqquysbv4Y" alt=""><figcaption></figcaption></figure>

Let's check out our cart.

<figure><img src="/files/l0j4P1UQced8btHCpRxP" alt=""><figcaption></figcaption></figure>

We can see that the quantity of "The Trolley-ON" has gone from 1 to -21. More importantly the price which in in negative has been subtracted from the jacket's price and the total is now lower than our credits.&#x20;

Let's buy the products.

<figure><img src="/files/L46HHMNLS2CtkIU2QtRW" alt=""><figcaption></figcaption></figure>

We have solved the lab.

<figure><img src="/files/SEEiq7lFrgFok2FBin73" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kunalwalavalkar.gitbook.io/write-ups/portswigger-labs/server-side-topics/business-logic-vulnerabilities/high-level-logic-vulnerability.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
