CVE-2024-57186
JavaScript vulnerability analysis and mitigation

Overview

In Erxes <1.6.2, an unauthenticated attacker can read arbitrary files from the system using a Path Traversal vulnerability in the /read-file endpoint handler. The vulnerability was discovered in March 2024 and is tracked as CVE-2024-57186. The vulnerability affects the core service of Erxes, an open-source experience management solution (Sonar Blog).

Technical details

The vulnerability exists in the readFileRequest() function that handles the /read-file endpoint. The function takes a 'key' parameter from user input without proper validation and uses it to construct filesystem paths. An attacker can exploit this by using relative path traversal sequences (../) to access files outside the intended directory. The vulnerability was fixed in version 1.6.2 by implementing proper filename sanitization (Erxes Commit, Sonar Blog).

Impact

The vulnerability allows attackers to read sensitive files from the system, including configuration files and environment variables that may contain authentication secrets and database credentials. In the context of Erxes' microservices architecture, this could lead to exposure of critical system information and potentially enable further attacks (Sonar Blog).

Mitigation and workarounds

The vulnerability has been patched in Erxes version 1.6.2 by implementing proper filename sanitization. Users are strongly recommended to upgrade to version 1.6.2 or later to address this security issue (Erxes Commit, Sonar Blog).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management