Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-112097 Overview
CVE-2026-112097 is a cross-site scripting (XSS) vulnerability [CWE-79] in SourceCodester Inventory System 1.0. The flaw affects the Sales Management Handler component, specifically the /api/transactions_handler.php?action=save_sale endpoint. Attackers can inject malicious script content through the Hsn_Code parameter. The attack can be launched remotely and requires low privileges with user interaction.
Critical Impact
Authenticated remote attackers can inject arbitrary JavaScript through the Hsn_Code parameter, enabling session theft, credential capture, and actions performed in the context of other application users.
Affected Products
- SourceCodester Inventory System 1.0
- Sales Management Handler component
- /api/transactions_handler.php endpoint (action=save_sale)
Discovery Timeline
- 2026-10-19 - CVE-2026-112097 published to the National Vulnerability Database (NVD)
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-112097
Vulnerability Analysis
The vulnerability resides in the Sales Management Handler of SourceCodester Inventory System 1.0. The save_sale action within /api/transactions_handler.php accepts user-supplied input via the Hsn_Code argument without proper sanitization or output encoding. An authenticated attacker can submit a crafted sales entry containing script payloads in the Hsn_Code field. When the stored data renders in the application interface, the browser executes the injected script in the victim's session context.
The EPSS score is 0.199%, indicating a low near-term probability of mass exploitation. However, applications exposed to multiple users or sales staff remain at risk because stored XSS persists across sessions.
Root Cause
The root cause is improper neutralization of input during web page generation [CWE-79]. The save_sale handler stores the Hsn_Code parameter and later reflects it into HTML responses without applying contextual output encoding or input validation. Any valid HTML or JavaScript syntax submitted to this field persists in the database and executes on retrieval.
Attack Vector
Exploitation requires network access to the application and a low-privilege authenticated session capable of creating or editing sales records. The attacker submits a POST request to /api/transactions_handler.php?action=save_sale with a JavaScript payload inside the Hsn_Code parameter. The injected script executes when any user with access to the affected sales view loads the record. Successful exploitation enables session cookie theft, forced browser actions, and phishing overlays within the trusted application origin.
For technical reproduction steps, see the published GitHub CVE Markdown Document and the VulDB Vulnerability Details.
Detection Methods for CVE-2026-112097
Indicators of Compromise
- HTTP POST requests to /api/transactions_handler.php?action=save_sale containing <script>, onerror=, onload=, or javascript: tokens in the Hsn_Code parameter.
- Database rows in sales-related tables where the Hsn_Code column contains HTML tags or JavaScript syntax.
- Browser console errors or unexpected outbound requests from users viewing sales records.
Detection Strategies
- Inspect web server access logs for POST requests to the save_sale action with URL-encoded script fragments in the request body.
- Deploy web application firewall (WAF) rules that flag common XSS payload patterns targeting the Hsn_Code parameter.
- Perform periodic database audits on the sales table to identify stored values containing HTML or script characters.
Monitoring Recommendations
- Enable verbose request body logging on the /api/transactions_handler.php endpoint to capture suspicious submissions.
- Monitor authenticated user activity for unusual sales record creation volume or anomalous payload lengths in the Hsn_Code field.
- Alert on outbound HTTP requests from client sessions pointing to unknown domains after sales record access.
How to Mitigate CVE-2026-112097
Immediate Actions Required
- Restrict access to the Inventory System to trusted internal networks until a vendor fix is available.
- Review and sanitize existing sales records to remove any stored HTML or JavaScript content in the Hsn_Code field.
- Rotate session tokens and reset credentials for users who may have viewed malicious sales entries.
Patch Information
No vendor patch is referenced in the NVD entry or VulDB disclosure at the time of publication. Monitor the SourceCodester Homepage and the VulDB CVE Record for update availability.
Workarounds
- Implement a WAF rule that rejects requests to /api/transactions_handler.php containing script tags, event handlers, or javascript: URIs in any parameter.
- Apply server-side input validation to enforce an alphanumeric allowlist on the Hsn_Code field consistent with Harmonized System of Nomenclature codes.
- Add contextual output encoding (HTML entity encoding) at every location where sales fields render in the user interface.
- Deploy a strict Content Security Policy (CSP) that disallows inline scripts and restricts script sources to trusted origins.
# Example ModSecurity rule blocking script payloads in Hsn_Code
SecRule ARGS:Hsn_Code "@rx (?i)(<script|onerror=|onload=|javascript:)" \
"id:1012175,phase:2,deny,status:403,log,\
msg:'CVE-2026-112097: XSS attempt in Hsn_Code parameter'"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

