Disclosed vulnerabilities
Fixed: Sep 26, 2023
CVE-2023-46495 Published: Sep 26, 2023

Reflected XSS in Front Store 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.8 contains a Reflected Cross-Site Scripting (XSS) vulnerability. Attackers can exploit this issue by adding a second “sortBy” parameter to the request. This unexpected behavior will return the second “sortBy” value in the page’s code, potentially enabling the successful execution of XSS payloads.

Product

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

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.8
  2. Run the EverShop Web Application on localhost
  3. Navigate to the endpoint category/men
  4. Use the following query parameter: sortBy=name&sortBy=<script>alert('XSS')</script>

Expected result:

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

Remediation

A fix was released in commit 5aa38b0, where input validation was implemented to protect against XSS. Users are recommended to upgrade to version 1.0.0-rc.8, 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!