Skip to content
This repository was archived by the owner on Dec 22, 2024. It is now read-only.
This repository was archived by the owner on Dec 22, 2024. It is now read-only.

hotel-mgmt-system has an improper authentication logic vulnerability #33

@ArthurHendrich

Description

@ArthurHendrich

PoC - Proof of Concept


Initially, accessing the application's login page

image

Next, intercepting the request using Burp Suite and sending a login request with an invalid, random password.

image 1

Sending the request to the application successfully logs in, even with an incorrect password.

image 2

Code Review


When a user sends a login request, the process_login.php endpoint is called.

Upon reviewing the code, we can see that the function responsible for checking if the password is correct is isPasswordMatchWithEmail. If this function returns false, the password is considered incorrect.

image 3

However, upon inspecting the implementation of this function in CustomerHandler.php, it is evident that it returns a string instead of a boolean value.

image 4

As a result, whenever the function returns any non-empty string, PHP interprets it as true, allowing the login process to proceed even when the password is incorrect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions