# CVE-2024-34713: sshproxy vulnerable to SSH option injection


- **Severity:** Low 3.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 14 May 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-jmqp-37m5-49wh, GO-2024-2836

## What is CVE-2024-34713?

CVE-2024-34713 is a low-severity vulnerability in cea-hpc sshproxy, published on 14 May 2024. 

### Official description

sshproxy is used on a gateway to transparently proxy a user SSH connection on the gateway to an internal host via SSH. Prior to version 1.6.3, any user authorized to connect to a ssh server using `sshproxy` can inject options to the `ssh` command executed by `sshproxy`. All versions of `sshproxy` are impacted. The problem is patched starting in version 1.6.3. The only workaround is to use the `force_command` option in `sshproxy.yaml`, but it's rarely relevant.

Weakness: CWE-77 (Improper Neutralization of Special Elements used in a Command)

## Which versions are affected by CVE-2024-34713?

3 open source packages ship an affected version, including github.com/cea-hpc/sshproxy.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cea-hpc/sshproxy` | Go | All versions | 1.6.3 |
| `github.com/cea-hpc/sshproxy` | Go | All versions | 1.6.3 |
| `github.com/cea-hpc/sshproxy` | Go | All versions | 1.6.3 |

## How do I fix CVE-2024-34713?

Upgrade github.com/cea-hpc/sshproxy to 1.6.3 or later.

## Is CVE-2024-34713 being exploited?

There is no known exploitation of CVE-2024-34713 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-34713 and fix it if it is affected.

What it is: CVE-2024-34713 is a low-severity vulnerability in cea-hpc sshproxy, published on 14 May 2024. 
Exploitation: There is no known exploitation of CVE-2024-34713 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cea-hpc/sshproxy (Go): affected all versions; fixed in 1.6.3
- github.com/cea-hpc/sshproxy (Go): affected all versions; fixed in 1.6.3
- github.com/cea-hpc/sshproxy (Go): affected all versions; fixed in 1.6.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-34713/ (Markdown: https://insights.sbomify.com/CVE-2024-34713/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-34713
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-34713
- OSV: https://osv.dev/vulnerability/CVE-2024-34713

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-34713/
Summaries are generated and may contain mistakes; the official description above is the record.
