{"id":"CVE-2024-52010","aliases":["CVE-2024-52010","GHSA-7hpf-g48v-hw3j","GO-2024-3267"],"related":[],"kind":"vulnerability","state":"published","title":"Zoraxy has an authenticated command injection in the Web SSH feature","summary":"Zoraxy is a general purpose HTTP reverse proxy and forwarding tool. A command injection vulnerability in the Web SSH feature allows an authenticated attacker to execute arbitrary commands as root on the host. 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. 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Zoraxy is a general purpose HTTP reverse proxy and forwarding tool. A command injection vulnerability in the Web SSH feature allows an authenticated attacker to execute arbitrary commands as root on the host. 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. 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.","source":"cvelist"},{"lang":"en","text":"### Summary\nA command injection vulnerability in the Web SSH feature allows an authenticated attacker to execute arbitrary commands as root on the host.\n\n### Details\nZoraxy has a Web SSH terminal feature that allows authenticated users to connect to SSH servers from their browsers.\nIn [`HandleCreateProxySession`](https://github.com/tobychui/zoraxy/blob/9cb315ea6739d1cc201b690322d25166b12dc5db/src/webssh.go#L19) 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:\n\nhttps://github.com/tobychui/zoraxy/blob/e79a70b7acfa45c2445aff9d60e4e7525c89fec8/src/mod/sshprox/sshprox.go#L165-L178\n\nIn 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.\nAn 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.\n\nThis vulnerability was introduced in https://github.com/tobychui/zoraxy/commit/c07d5f85dfc37bd32819358ed7d4bc32c604e8f0.\nIf Zoraxy is run without authentication of the management interface (started with`-noauth`), this vulnerability can be exploited without authentication.\nAdditionally, 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.\n\n### PoC\n1. Download and run Zoraxy as described in the [README](https://github.com/tobychui/zoraxy/blob/9a371f5bcbccce0918c61621f3b26ee549e01b90/README.md#standalone-mode)\n2. Setup a user\n3. Login as user\n4. Navigate to Other -> Network Tools -> Connection\n5. Enter hostname / IP of any server with SSH running, e.g. `github.com`\n6. Enter `; bash ;` as user\n7. Click `Connect using SSH`\n8. A window will open with `bash` running on the Zoraxy host\n\nDemo:\n\nhttps://github.com/user-attachments/assets/5a3d8771-167f-4a79-8665-ed0dfb490181\n\n### Impact\nThis 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Zoraxy has an authenticated command injection in the Web SSH feature in github.com/tobychui/zoraxy.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: .","format":"markdown","source":"go"},{"lang":"es","text":"Zoraxy es una herramienta de reenvío y proxy inverso HTTP de propósito general. Una vulnerabilidad de inyección de comandos en la función Web SSH permite a un atacante autenticado ejecutar comandos arbitrarios como superusuario en el host. Zoraxy tiene una función de terminal Web SSH que permite a los usuarios autenticados conectarse a servidores SSH desde sus navegadores. En HandleCreateProxySession se maneja la solicitud para crear una sesión SSH. Un atacante puede explotar la variable de nombre de usuario para escapar del comando bash e inyectar comandos arbitrarios en sshCommand. Esto es posible porque, a diferencia del nombre de host y el puerto, el nombre de usuario no se valida ni se desinfecta.","source":"nvd"}],"published":"2024-11-12T16:06:31.719Z","modified":"2026-06-17T08:06:47.833Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:N","score":0,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P","rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":">= 2.6.1, < 3.1.3","status":"affected"}],"vendor":"tobychui","product":"zoraxy","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.6.1","status":"affected","fixed":"3.1.3"}],"ecosystem":"Go","package":"github.com/tobychui/zoraxy","purl":"pkg:golang/github.com/tobychui/zoraxy","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.1.3+incompatible"}],"ecosystem":"Go","package":"github.com/tobychui/zoraxy","purl":"pkg:golang/github.com/tobychui/zoraxy","source":"go"}],"references":[{"url":"https://github.com/tobychui/zoraxy/security/advisories/GHSA-7hpf-g48v-hw3j","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/tobychui/zoraxy/commit/2e9bc77a5d832bff1093058d42ce7a61382e4bc6","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/tobychui/zoraxy/commit/c07d5f85dfc37bd32819358ed7d4bc32c604e8f0","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-52010","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/tobychui/zoraxy","tags":["package"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2024-3267","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-11-12T18:33:03.324Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-52010","url":"https://www.cve.org/CVERecord?id=CVE-2024-52010","licence":"CVE Terms of Use","modified":"2024-11-21T16:20:35.981Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7hpf-g48v-hw3j","url":"https://github.com/advisories/GHSA-7hpf-g48v-hw3j","licence":"CC-BY-4.0","modified":"2024-11-19T19:38:19.000Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-3267","url":"https://pkg.go.dev/vuln/GO-2024-3267","licence":"CC-BY-4.0","modified":"2024-11-19T17:42:36.463Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-52010","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-52010","licence":"Public domain","modified":"2026-06-17T08:06:47.833Z"}],"updatedAt":"2026-11-25T22:58:48.100Z","epss":{"score":0.01503,"percentile":0.75061,"date":"2026-12-01T12:00:22.000Z"}}