> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/web/business-logic/weak-isolation-on-dual-use-endpoint.md).

# Weak Isolation on a Dual-Use Endpoint

Weak Isolation on a Dual-Use Endpoint notes for PortSwigger Web Security Academy labs, including exploitation workflow, payload testing, Burp Suite validation, and remediation context.

### Weak Isolation on Dual-use Endpoint

**Description of lab**

This lab is based on an erroneous assumption regarding the level of user privileges, based only on the parameters sent by the client. / By exploiting a logical flaw in account management functionality, it is possible to take control of arbitrary accounts, including the administrator account.

\*\* Target:\*\*/ Access the admin account and delete user **carlos**.

**Provided credentials:**

* User: `wiener`
* Password: `peter`

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-74c1de58a011a3016745410f7a779e67f56d1e97%2F%7BE26372DD-5036-4018-B508-159C238169A4%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**Observation of password change mechanism**

Once connected to the `wiener` account, a feature allows you to change the password. / The request sent to the server is as follows:

```bash
csrf=3wgY9AYHzbOWg73KitML2AQkY0fef2kK
&username=wiener
&current-password=peter
&new-password-1=jordan
&new-password-2=jordan
```

The server uses the `username` parameter provided by the client to determine the account to be changed.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1e7e01cd92e29ae6e32a5d8336c23e4f0cc57f11%2F%7B0FB80FBF-2698-440E-A47F-98F3CF059ACE%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**Operating logical fault**

By changing the query, it is possible to target another user.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4c19968ccdfa7260e513467e7982e77dac3bb1c1%2F%7B08AB3451-19B9-46E0-A53C-968957C2C9D4%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

In addition, the `current-password` parameter is not properly checked.

Amended user request **carlos**:

{% code overflow="wrap" %}

```bash
csrf=3wgY9AYHzbOWg73KitML2AQkY0fef2kK
&username=carlos
&new-password-1=jordan
&new-password-2=jordan
```

{% endcode %}

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4ff4f433aa84321153b12aad76060cfe1e005dda%2F%7B4E75EAA8-6213-4018-A8B0-ECCB0BBA45BA%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

The server accepts the request and changes the password of the account **carlos**, without requiring the old password.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/web/business-logic/weak-isolation-on-dual-use-endpoint.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
