CVE-2026-10247: SourceCodester Pharmacy Sales and Inventory System main create_generic_name cross site scripting
A vulnerability was found in SourceCodester Pharmacy Sales and Inventory System 1.0. This vulnerability affects the function creategenericname of the file /ShowForm/creategenericname/main. The manipulation of the argument genericname results in cross site scripting. The attack may be launched remotely. The exploit has been made public and could be used.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Remove
Remove
SourceCodester Pharmacy Sales and Inventory System /ShowForm/create_generic_name/mainfrom your environment.If the create_generic_name function is not required, remove or disable this endpoint to eliminate the vulnerable code path.
- Configuration
Validate and sanitize the generic_name parameter on the server side and apply proper HTML output encoding before rendering it in any page. Ensure characters such as <, >, &, ' and " are escaped or encoded according to the HTML context to prevent reflected/stored XSS.
SourceCodester Pharmacy Sales and Inventory System - /ShowForm/create_generic_name/main generic_name input handling = server-side validation and context-appropriate output encoding - Configuration
Add a strict Content-Security-Policy header to responses (for example, disallow inline scripts and allow scripts only from trusted origins) to reduce the impact of potential XSS exploitation.
HTTP response headers (web server / application) Content-Security-Policy = restrict script-src to trusted origins; disallow inline scripts where possible - Compensating control
Deploy a Web Application Firewall (WAF) or equivalent filtering to block XSS payloads targeting the create_generic_name endpoint and consider restricting access to /ShowForm/create_generic_name/main to trusted IPs or authenticated users until the application is fixed.
- Operational
Monitor webserver and application logs for suspicious requests and exploitation attempts against the create_generic_name endpoint; investigate and perform incident response if signs of compromise are detected.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-10247?
The severity of CVE-2026-10247 is low with a score of 3.5.
How do I fix CVE-2026-10247?
To fix CVE-2026-10247, sanitize and validate user input in the create_generic_name function to prevent cross site scripting.
What type of vulnerability is CVE-2026-10247?
CVE-2026-10247 is a cross site scripting (XSS) vulnerability.
Which system is affected by CVE-2026-10247?
CVE-2026-10247 affects the SourceCodester Pharmacy Sales and Inventory System version 1.0.
What impact does CVE-2026-10247 have on users?
CVE-2026-10247 may allow an attacker to execute scripts in the context of a user's session, potentially leading to data theft or session hijacking.