CVE-2026-10247
Description
A stored XSS vulnerability in SourceCodester Pharmacy Sales and Inventory System 1.0 allows remote unauthenticated attackers to inject arbitrary scripts via the generic_name parameter.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A stored XSS vulnerability in SourceCodester Pharmacy Sales and Inventory System 1.0 allows remote unauthenticated attackers to inject arbitrary scripts via the generic_name parameter.
Vulnerability
A stored cross-site scripting (XSS) vulnerability exists in SourceCodester Pharmacy Sales and Inventory System version 1.0. The flaw resides in the create_generic_name function of the file /ShowForm/create_generic_name/main. The generic_name parameter is echoed directly to the web page without proper sanitization or output encoding, allowing injection of arbitrary HTML and JavaScript. No authentication is required to reach the vulnerable endpoint [1].
Exploitation
An attacker can exploit this vulnerability by sending a crafted HTTP request to the /ShowForm/create_generic_name/main endpoint with a malicious payload in the generic_name parameter. For example, the payload `` demonstrates the ability to execute JavaScript. The exploit requires no prior authentication or special privileges, and the attacker only needs network access to the target system. The proof-of-concept code has been publicly disclosed [1].
Impact
Successful exploitation allows an attacker to execute arbitrary script code in the context of a victim's browser when the victim views the affected page. This can lead to theft of cookies, session tokens, or other sensitive information, impersonation of the victim, defacement of web pages, redirection to malicious sites, and potential control of the victim's browser. The impact is limited to the browser session and does not directly compromise the server [1].
Mitigation
As of the publication date (2026-06-01), no official patch has been released for SourceCodester Pharmacy Sales and Inventory System 1.0. The vendor has not responded to the disclosure. Mitigation requires manually sanitizing all user-supplied input in the generic_name parameter, implementing output encoding, or applying web application firewall (WAF) rules to block XSS payloads. Users should consider migrating to a supported or rewritten solution if the vendor does not provide a fix [1].
AI Insight generated on Jun 1, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2(expand)+ 1 more
- (no CPE)
- (no CPE)range: 1.0
Patches
0No patches discovered yet.
Vulnerability mechanics
Root cause
"Missing output encoding and input validation of the 'generic_name' parameter allows injection of arbitrary script code."
Attack vector
An attacker sends a crafted HTTP request to `/ShowForm/create_generic_name/main` with a malicious script payload in the `generic_name` parameter [ref_id=1]. The system reflects this input unsanitized into the HTML response, causing the victim's browser to execute the injected script. The advisory states that no login or authorization is required to exploit this vulnerability [ref_id=1]. This is a classic stored/reflected Cross-Site Scripting (XSS) attack.
Affected code
The vulnerability resides in the file `/ShowForm/create_generic_name/main` of the SourceCodester Pharmacy Sales and Inventory System 1.0. The function `create_generic_name` outputs the `generic_name` parameter directly to the web page without encoding or filtering [ref_id=1].
What the fix does
The advisory recommends output encoding of user input before rendering it to the web page, strict input validation and filtering to reject malicious content like script tags, and implementing a Content Security Policy (CSP) to restrict script execution [ref_id=1]. No official patch is provided in the bundle; the fix relies on the vendor applying these standard XSS mitigations.
Preconditions
- authNo authentication required; the endpoint is publicly accessible
- networkAttacker must be able to send HTTP requests to the vulnerable endpoint
- inputThe victim must visit the crafted URL or page containing the injected script
Generated on Jun 1, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6News mentions
0No linked articles in our index yet.