CVE-2026-30562

Published Mar 30, 2026 CVSS 3.1 · 9.3 Critical EPSS < 1% KEV · Not listed
Description
A Reflected Cross-Site Scripting (XSS) vulnerability exists in SourceCodester Sales and Inventory System 1.0. The vulnerability is located in the add_stock.php file via the "msg" parameter. The application fails to sanitize the input, allowing remote attackers to inject arbitrary web script or HTML via a crafted URL.

Analysis

AI-generated

Technical impact

A reflected Cross‑Site Scripting flaw exists in the SourceCodester Sales and Inventory System 1.0. The flaw is triggered through the uncensored 'msg' parameter in add_stock.php, enabling a remote attacker to embed arbitrary JavaScript or HTML into the page. An exploited victim’s browser would execute the injected code, allowing session hijacking, data theft, or site defacement.

Affected Systems

SourceCodester Sales and Inventory System version 1.0 is affected. The vulnerability is located in the add_stock.php module that accepts a 'msg' query string.

Risk and Exploitability

The CVSS score of 9.3 reflects a high risk; the EPSS score is below 1% and the flaw is not yet listed in the KEV catalog. Exploitation requires an attacker to craft a malicious URL that includes the injected payload in the 'msg' parameter and deliver it to a victim who visits the link. No authentication or privileged access is needed to trigger the flaw.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply an updated release of the SourceCodester Sales and Inventory System that removes the unsanitized 'msg' parameter handling.
  • If a patch is not available, modify the add_stock.php code to validate or encode input from the 'msg' parameter before rendering it in the response.
  • Implement a web application firewall or content security policy to block execution of injected scripts.
  • Monitor logs for suspicious 'msg' parameter usage and restrict access to the add_stock.php endpoint if possible.

Generated by OpenCVE AI on April 2, 2026 at 03:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Title Reflected XSS via msg Parameter in SourceCodester Sales and Inventory System
Type Values Removed Values Added
First Time appeared Ahsanriaz26gmailcom
Ahsanriaz26gmailcom sales And Inventory System
CPEs cpe:2.3:a:ahsanriaz26gmailcom:sales_and_inventory_system:1.0:*:*:*:*:*:*:*
Vendors & Products Ahsanriaz26gmailcom
Ahsanriaz26gmailcom sales And Inventory System
Type Values Removed Values Added
First Time appeared Sourcecodester
Sourcecodester sales And Inventory System
Vendors & Products Sourcecodester
Sourcecodester sales And Inventory System
Type Values Removed Values Added
Title Reflected XSS via msg Parameter in SourceCodester Sales and Inventory System
Type Values Removed Values Added
Weaknesses CWE-79
Metrics cvssV3_1

{'score': 9.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description A Reflected Cross-Site Scripting (XSS) vulnerability exists in SourceCodester Sales and Inventory System 1.0. The vulnerability is located in the add_stock.php file via the "msg" parameter. The application fails to sanitize the input, allowing remote attackers to inject arbitrary web script or HTML via a crafted URL.
References
Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Mar 30, 2026, 6:13 PM
Reserved
Mar 4, 2026, 12:00 AM
Status
Analyzed
Published
Mar 30, 2026, 4:16 PM
Modified
Jun 17, 2026, 10:32 AM