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

# منطق معيب في إعادة تعيين كلمة المرور

### منطق معطوب لإعادة تعيين كلمة المرور

يعرض المختبر ثغرة في آلية إعادة تعيين كلمة المرور. الهدف هو إعادة تعيين كلمة المرور لـ **كارلوس** ثم الوصول إلى صفحة حسابي الخاصة به. / المعرّف المُقدَّم:

* **wiener:peter**
* اسم الضحية: **carlos**

### التحليل والخطوات

#### 1. وظيفة نسيت كلمة المرور

يوفّر التطبيق ميزة استعادة عبر خيار نسيت كلمة المرور.

<figure><img src="/files/2f12771e122ecf8d5579b14c30744d9c42f42966" alt="" width="436"><figcaption></figcaption></figure>

من هذا القسم يمكن تغيير عنوان البريد الإلكتروني المرتبط بالحساب

<figure><img src="/files/4eb7f8d97105eb1a5e28eb26ea6630ea1f92519c" alt="" width="563"><figcaption></figcaption></figure>

#### 2. استلام رسالة إعادة التعيين

<figure><img src="/files/963c77d765d62cc7eaca011adb54e2d6dab9bf09" alt=""><figcaption></figcaption></figure>

بمجرد تغيير البريد الإلكتروني، يتم إرسال رسالة تحتوي على رابط إعادة تعيين. / تتضمن الرسالة رمزًا مؤقتًا **رمز** في عنوان URL:

```http
تم الإرسال:     2025-12-09 19:42:17 +0000
من:     "No reply" <no-reply@0ae200710383c04f868b0866005e0000.web-security-academy.net>
إلى:       wiener@exploit-0a46000003d9c0a086ee072901710023.exploit-server.net
الموضوع:  استعادة الحساب

مرحبًا!

يرجى اتباع الرابط أدناه لإعادة تعيين كلمة المرور الخاصة بك.

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

شكرًا،
فريق الدعم
```

#### 3. إرسال النموذج

من خلال الوصول إلى هذا الرابط، يطلب التطبيق إدخال كلمة مرور جديدة. / المعلمات المرسلة مشابهة لـ:

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

<figure><img src="/files/1ee8dde38fd78e228c43fcec41036d64315fc094" alt=""><figcaption></figcaption></figure>

#### 4. استغلال المنطق المعيب

لا يتحقق الخادم **لا** من أن الرمز يطابق فعليًا المستخدم المذكور في الاستعلام. / ما عليك سوى استبدال الحقل **username=wiener** بـ **username=carlos**:

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

يقبل التطبيق الطلب، مما يتيح تعيين كلمة مرور جديدة لكارلوس.

<figure><img src="/files/8978d14d6504b3ebf6cbb976a5216cd08499bdc1" 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/ar/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.
