CVE-2024-52010

CVE-2024-52010 is a high-severity OS command injection vulnerability in github.com/tobychui/zoraxy (go), affecting versions >= 2.6.1, < 3.1.3. It is fixed in 3.1.3.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Zoraxy has an authenticated command injection in the Web SSH feature

A command injection vulnerability in the Web SSH feature allows an authenticated attacker to execute arbitrary commands as root on the host.

Details

Zoraxy has a Web SSH terminal feature that allows authenticated users to connect to SSH servers from their browsers.
In HandleCreateProxySession the request to create an SSH session is handled. After checking for the presence of required parameters, ensuring that the target is not the loopback interface and that there is actually an SSH service running on the target, CreateNewConnection is called:

https://github.com/tobychui/zoraxy/blob/e79a70b7acfa45c2445aff9d60e4e7525c89fec8/src/mod/sshprox/sshprox.go#L165-L178

In line 178, the gotty binary is executed running sshCommand from the line above. It contains the user-controlled variable connAddr, which includes the hostname of the SSH server and - if provided - the username.
An attacker can exploit the username variable to escape from the bash command and inject arbitrary commands into sshCommand. This is possible, because, unlike hostname and port, the username is not validated or sanitized.

This vulnerability was introduced in https://github.com/tobychui/zoraxy/commit/c07d5f85dfc37bd32819358ed7d4bc32c604e8f0.
If Zoraxy is run without authentication of the management interface (started with-noauth), this vulnerability can be exploited without authentication.
Additionally, if Zoraxy is run in Docker with the Docker socket mounted (as described in https://github.com/tobychui/zoraxy/blob/9cb315ea6739d1cc201b690322d25166b12dc5db/docker/README.md), this vulnerability can be exploited to escape the Zoraxy container and gain access to the Docker host.

PoC

  1. Download and run Zoraxy as described in the README
  2. Setup a user
  3. Login as user
  4. Navigate to Other -> Network Tools -> Connection
  5. Enter hostname / IP of any server with SSH running, e.g. github.com
  6. Enter ; bash ; as user
  7. Click Connect using SSH
  8. A window will open with bash running on the Zoraxy host

Demo:

https://github.com/user-attachments/assets/5a3d8771-167f-4a79-8665-ed0dfb490181

Impact

This vulnerability allows an authenticated attacker to gain remote code execution with the privileges of the Zoraxy process (root by default). This affects Zoraxy versions 2.6.1 through 3.1.2.

Untrusted input reaches a shell command, allowing arbitrary commands to run on the host. Typical impact: code execution in the application's environment.

Affected versions

github.com/tobychui/zoraxy (>= 2.6.1, < 3.1.3)

Security releases

github.com/tobychui/zoraxy → 3.1.3 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade github.com/tobychui/zoraxy to 3.1.3 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2024-52010? CVE-2024-52010 is a high-severity OS command injection vulnerability in github.com/tobychui/zoraxy (go), affecting versions >= 2.6.1, < 3.1.3. It is fixed in 3.1.3. Untrusted input reaches a shell command, allowing arbitrary commands to run on the host.
  2. Which versions of github.com/tobychui/zoraxy are affected by CVE-2024-52010? github.com/tobychui/zoraxy (go) versions >= 2.6.1, < 3.1.3 is affected.
  3. Is there a fix for CVE-2024-52010? Yes. CVE-2024-52010 is fixed in 3.1.3. Upgrade to this version or later.
  4. Is CVE-2024-52010 exploitable, and should I be worried? Whether CVE-2024-52010 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2024-52010 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2024-52010? Upgrade github.com/tobychui/zoraxy to 3.1.3 or later.

Other vulnerabilities in github.com/tobychui/zoraxy

Stop the waste.
Protect your environment with Kodem.