VYPR
Unrated severityNVD Advisory· Published Jul 29, 2022· Updated Apr 15, 2025

SourceCodester Garage Management System createUser.php cross site scripting

CVE-2022-2579

Description

Stored XSS in SourceCodester Garage Management System 1.0 via userName parameter allows remote attackers to inject arbitrary JavaScript.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Stored XSS in SourceCodester Garage Management System 1.0 via userName parameter allows remote attackers to inject arbitrary JavaScript.

Vulnerability

A stored cross-site scripting (XSS) vulnerability exists in SourceCodester Garage Management System version 1.0. The issue resides in the /php_action/createUser.php file, where the userName parameter is not properly sanitized before being stored. An attacker can inject arbitrary HTML and JavaScript code, which will be executed when the stored data is rendered in the application. The vulnerability is classified as problematic and has been publicly disclosed [1].

Exploitation

An attacker can exploit this vulnerability by sending a crafted HTTP POST request to /php_action/createUser.php with a malicious payload in the userName field. The request does not require authentication if the user creation functionality is accessible, but the reference shows a session cookie indicating that an authenticated user with user creation privileges can trigger the XSS. The payload, such as lala, is stored in the database and executed when an administrator or other user views the user list or profile [1].

Impact

Successful exploitation allows the attacker to execute arbitrary JavaScript in the context of the victim's browser. This can lead to session hijacking, defacement, theft of sensitive information, or further attacks against the application. The impact is limited to the browser session of users who view the affected user data, but it can be used to compromise administrative accounts if an admin views the malicious entry [1].

Mitigation

As of the publication date (2022-07-29), no official patch has been released by the vendor. Users should apply input validation and output encoding to the userName parameter. Specifically, sanitize user input to remove or escape HTML tags before storing and rendering. Until a fix is available, restrict access to the user creation functionality to trusted users only. The vulnerability is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog [1].

AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"Missing input sanitization on the `userName` parameter allows stored cross-site scripting."

Attack vector

An attacker sends a POST request to `/php_action/createUser.php` with a crafted `userName` parameter containing a JavaScript payload, such as `lala<img src="" onerror=alert(1)>` [ref_id=1]. The payload is stored in the database and executed when any user visits the `/users.php` page, which renders the unsanitized `userName` value. The attack is remote and requires no special privileges beyond network access to the application.

Affected code

The vulnerable endpoint is `/php_action/createUser.php` in the Garage Management System 1.0. The `userName` parameter is processed without sanitization, allowing arbitrary HTML and JavaScript to be stored in the database and later rendered on the user listing page.

What the fix does

No patch is provided in the bundle. The advisory [ref_id=1] states that the application "does not filter the content correctly at the 'userName' parameter." The remediation would require proper input validation and output encoding of the `userName` field before storing it in the database and when rendering it on the `/users.php` page, preventing the execution of injected HTML and JavaScript.

Preconditions

  • networkAttacker must have network access to the Garage Management System web application
  • configThe application must be running and the /php_action/createUser.php endpoint must be reachable

Reproduction

1. Send a POST request to `/php_action/createUser.php` with a multipart form-data body containing `userName` set to `lala<img src="" onerror=alert(1)>` [ref_id=1]. 2. Navigate to `/users.php` — the stored XSS payload executes and triggers the JavaScript alert.

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

References

2

News mentions

0

No linked articles in our index yet.