Disclosed vulnerabilities
Fixed: Apr 27, 2023
CVE-2023-46494 Published: Apr 27, 2023

Reflected XSS in Admin Panel in @evershop/evershop

6.1 Medium Severity js npm reflected XSS
Mário Teixeira Reported by Checkmarx Zero

Summary

NPM’s package @evershop/evershop prior to 1.0.0-rc.5 contains a Reflected Cross-Site Scripting (XSS) vulnerability in the Admin Panel. This security flaw allows attackers to inject malicious code into the application’s admin panel, particularly in the “Product Name” and “SKU” input fields when searching for products, leading to the execution of unauthorized JavaScript code in the browser. Other similar input fields are also affected.

Product

This vulnerability affects NPM’s package @evershop/evershop in versions prior to 1.0.0-rc.5.

Impact

This issue enables an attacker to execute an unauthorized JavaScript code in the browser.

Steps to reproduce

  1. Install the @evershop/evershop package dependency for any version prior to 1.0.0-rc.5
  2. Run the EverShop Web Application on localhost
  3. Navigate to the endpoint admin/products
  4. Use the following query parameter: name=%3C%2Fscript%3E%3Cscript%3Ealert%28%27XSS%27%29%3C%2Fscript%3E

Expected result:

A pop-up alert with the message “XSS” will appear.

Remediation

A fix was released in commit 0b5cb6e, where input validation was implemented to protect against XSS. Users are recommended to upgrade to version 1.0.0-rc.5, which includes this fix.

Credit

This issue was discovered and reported by Checkmarx SCA Security Analyst Mário Teixeira.

Resources

  1. Pull Request
  2. Commit

Stay connected and never miss a research update!