CVE-2024-57186: Erxes path traversal vulnerability in file read endpoint

CVE-2024-57186 · Severity: medium · CVSS 4 · Published 2025-06-10

Erxes is an open-source customer engagement platform that handles file uploads and retrieval. An unauthenticated attacker can exploit a path traversal flaw in the /read-file endpoint to read any file from the server, potentially exposing sensitive system files, configuration data, and private customer information without any authentication.

Technologies: erxes (npm). Vendors: npm.

Quick answers

Is CVE-2024-57186 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-57186 being exploited in the wild.
How severe is CVE-2024-57186?
Medium severity, with a CVSS score of 4, published 10 June 2025.
Which products and versions are affected?
erxes (npm) SEMVER:introduced=0,fixed=1.6.2.
Is there a fix for CVE-2024-57186?
Yes. erxes (npm): upgrade to 1.6.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2024-57186 attacked?
It is attacked over the network.
Am I affected by CVE-2024-57186?
Check whether you run erxes (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

  • erxes (npm): upgrade to 1.6.2 or later
    npm install erxes@1.6.2

Technical details

This is a classic path traversal vulnerability (CWE-22) in the /read-file HTTP endpoint handler. The vulnerability exists because the endpoint fails to properly sanitize or validate user-supplied file path input before processing it, allowing attackers to use directory traversal sequences (e.g., "../../../") to escape the intended directory and access arbitrary files on the system. The flaw is reachable over the network without authentication, making it trivial to exploit. An attacker can read system files like /etc/passwd, configuration files with credentials, private keys, or any other readable file accessible by the application process. The fix, deployed in version 1.6.2, adds filename sanitization using a sanitizeFilename utility function.

Affected products

  • Erxes Erxes <1.6.2

Identifiers

  • CVE-2024-57186
  • GHSA-rq9r-qvwg-829q

Timeline

  • 2025-06-10: disclosed
  • 2025-06-10: patched: Fixed in version 1.6.2

References

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