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