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

SourceCodester Simple Inventory System tableedit.php#page=editprice cross-site request forgery

CVE-2024-5097

Description

A vulnerability, which was classified as problematic, was found in SourceCodester Simple Inventory System 1.0. Affected is an unknown function of the file /tableedit.php#page=editprice. The manipulation of the argument itemnumber leads to cross-site request forgery. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-265080.

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"Missing CSRF token verification in the price update form allows an attacker to forge requests that modify product prices."

Attack vector

An attacker crafts a malicious HTML page containing a form that auto-submits a POST request to `updateprice.php` with the `ITEM` and `itemprice` parameters. When a logged-in victim visits the attacker's page, the form is submitted silently, modifying product prices without the victim's consent. The attack is launched remotely and requires no special privileges beyond the victim being authenticated [ref_id=1].

Affected code

The vulnerability is in the file `/tableedit.php#page=editprice` and the backend handler `updateprice.php`. The parameter `$_POST['itemnumber']` (referred to as `ITEM` in the PoC) is processed without any token or CSRF protection [ref_id=1].

What the fix does

No patch has been published by the vendor. The advisory states that the root cause is a "lack of token verification mechanism" in `tableedit.php` and `updateprice.php`, where the backend directly splices POST data into SQL update statements without validating the request origin [ref_id=1]. The recommended remediation is to implement anti-CSRF tokens (e.g., a nonce or synchronizer token) on the form and verify the token server-side before processing the price update.

Preconditions

  • authVictim must be logged into the Simple Inventory System application
  • inputAttacker must trick the victim into visiting a malicious HTML page

Reproduction

1. Save the PoC HTML from the reference write-up as an `.html` file, adjusting the form action URL to point to the target's `updateprice.php` endpoint. 2. Ensure the victim is logged into the Simple Inventory System. 3. Deliver the HTML file to the victim (e.g., via email or link) and have them open it. 4. The form auto-submits, changing the product price to the attacker-specified value (e.g., 888) [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.