VYPR
Unrated severityNVD Advisory· Published May 18, 2024· Updated Aug 1, 2024

SourceCodester Best House Rental Management System view_payment.php sql injection

CVE-2024-5094

Description

A vulnerability was found in SourceCodester Best House Rental Management System 1.0 and classified as critical. This issue affects some unknown processing of the file view_payment.php. The manipulation of the argument id leads to sql injection. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used. The identifier VDB-265073 was assigned to this vulnerability.

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"Missing input sanitization and lack of parameterized queries in view_payment.php allow SQL injection via the id parameter."

Attack vector

An attacker can trigger the SQL injection by sending a crafted GET request to `view_payment.php` with a malicious `id` parameter. The attack is remotely exploitable with no authentication required — the researcher's PoC shows the request originates from the tenants page view button, but the vulnerable endpoint is directly accessible [ref_id=1]. The `id` parameter is vulnerable to both boolean-based blind and time-based blind SQL injection, as confirmed by sqlmap output showing payloads such as `id=12 AND 5328=5328` and `id=12 AND (SELECT 7871 FROM (SELECT(SLEEP(5)))Ovop)` [ref_id=1].

Affected code

The vulnerability exists in the file `view_payment.php` of the Best House Rental Management System. The `id` parameter is passed directly into a SQL query without sanitization or parameterization, as demonstrated by the researcher's proof-of-concept at `http://localhost/rental/view_payment.php?id=12` [ref_id=1].

What the fix does

No patch is provided in the bundle. The advisory does not include a fix commit or vendor remediation. To close this vulnerability, the application should use prepared statements with parameterized queries (e.g., PDO or MySQLi prepared statements) instead of directly interpolating the `id` parameter into the SQL query. Input validation (ensuring `id` is an integer) would also mitigate the issue.

Preconditions

  • networkThe attacker must be able to send HTTP GET requests to the vulnerable endpoint view_payment.php.
  • authNo authentication is required; the endpoint is publicly accessible.
  • inputThe id parameter must be accepted by the application without sanitization or type validation.

Reproduction

1. Navigate to `http://localhost/rental/index.php?page=tenants` and click the "view" button on any tenant entry. 2. Capture the resulting GET request to `/rental/view_payment.php?id=12` using Burp Suite and send it to Repeater. 3. Save the raw request to a file (e.g., `r.txt`). 4. Run sqlmap: `sqlmap -r r.txt -p id --risk 3 --level 5 --dbms mysql --batch --current-db` 5. Observe that the tool confirms boolean-based and time-based blind injection and dumps the database name `house_rental_latest` [ref_id=1].

Generated on May 24, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.