Disclosed vulnerabilities
Fixed: Sep 26, 2023
CVE-2023-46493 Published: Sep 25, 2023

Directories List (via Relative Path Traversal) in @evershop/evershop

4.9 Medium Severity js npm path relative traversal
André Machado Reported by Checkmarx Zero

Summary

NPM’s package @evershop/evershop prior to 1.0.0-rc.8 is missing input validation in the function ‘readdirSync’ in ‘fileBrowser/browser.js’ which leads to Relative Path Traversal. This vulnerability allows an attacker to list all the folders and files on the filesystem through the API endpoint ‘/api/files’.

Product

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

Impact

This issue may lead to directories list via Relative Path Traversal.

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. Make a GET request to endpoint /api/files/../

Expected result:

The response will list all the files and folders on the filesystem.

Remediation

A fix was released in commit 677651c, where input validation was implemented to protect against Path Traversal attacks. 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 André Machado.

Resources

  1. Pull Request
  2. Commit

Stay connected and never miss a research update!