CVE-2023-46493: EverShop directory traversal in file browser

CVE-2023-46493 · Severity: low · CVSS 3.1 · Published 2023-12-08

EverShop is a TypeScript-based e-commerce platform. A directory traversal vulnerability in its file browser API allows unauthenticated attackers to list files and directories on the server's filesystem, potentially exposing application source code, configuration files, and other sensitive data. The flaw stems from missing input validation in file path handling.

Technologies: EverShop, @evershop/evershop (npm). Vendors: EverShop, npm.

Quick answers

Is CVE-2023-46493 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2023-46493 being exploited in the wild.
How severe is CVE-2023-46493?
Low severity, with a CVSS score of 3.1, published 8 December 2023.
Which products and versions are affected?
EverShop < 1.0.0-rc.8; @evershop/evershop (npm) SEMVER:introduced=0,fixed=1.0.0-rc.8.
Is there a fix for CVE-2023-46493?
Yes. @evershop/evershop (npm): upgrade to 1.0.0-rc.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2023-46493 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2023-46493?
Check whether you run EverShop or @evershop/evershop (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @evershop/evershop (npm): upgrade to 1.0.0-rc.8 or later
    npm install @evershop/evershop@1.0.0-rc.8

Technical details

A path traversal vulnerability (CWE-22) exists in EverShop versions before 1.0.0-rc.8 in the readDirSync function within fileBrowser/browser.js. The /api/files API endpoint accepts user-supplied input without proper validation, allowing attackers to craft requests using relative path sequences (e.g., ../) to traverse the filesystem and enumerate arbitrary directories and files. The vulnerability requires no authentication and can be exploited from the network. An attacker can leverage this to discover sensitive files such as application credentials, source code, configuration data, and system files, compromising the confidentiality of the application and potentially aiding further attacks. A patch is available in version 1.0.0-rc.8 and later.

Affected products

  • EverShop @evershop/evershop < 1.0.0-rc.8

Identifiers

  • CVE-2023-46493
  • GHSA-4wrm-qmq2-5fjx

Timeline

  • 2023-12-08: disclosed: Published on OSV and NVD
  • 2023-09-27: patched: Fix merged in PR #338; released in version 1.0.0-rc.8

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.