# CVE-2024-35175: sshpiper's Enabling of Proxy Protocol without proper feature flagging allows faking source address

> Attackers can forge source addresses in sshpiper logs, undermining security monitoring and rate limiting controls.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 May 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-4w53-6jvp-gg52, GO-2024-2853

## What is CVE-2024-35175?

CVE-2024-35175 is a medium-severity vulnerability in tg123 sshpiper, published on 14 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

sshpiper is a reverse proxy for sshd. Starting in version 1.0.50 and prior to version 1.3.0, the way the proxy protocol listener is implemented in sshpiper can allow an attacker to forge their connecting address. Commit 2ddd69876a1e1119059debc59fe869cb4e754430 added the proxy protocol listener as the only listener in sshpiper, with no option to toggle this functionality off. This means that any connection that sshpiper is directly (or in some cases indirectly) exposed to can use proxy protocol to forge its source address. Any users of sshpiper who need logs from it for whitelisting/rate limiting/security investigations could have them become much less useful if an attacker is sending a spoofed source address. Version 1.3.0 contains a patch for the issue.

Weakness: CWE-345 (Insufficient Verification of Data Authenticity)

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

3 open source packages ship an affected version, including github.com/tg123/sshpiper.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/tg123/sshpiper` | Go | From 1.0.50 | 1.3.0 |
| `github.com/tg123/sshpiper` | Go | From 1.0.50 | 1.3.0 |
| `github.com/tg123/sshpiper` | Go | From 1.0.50 | 1.3.0 |

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

Upgrade github.com/tg123/sshpiper to 1.3.0 or later.

## Is CVE-2024-35175 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-35175 exists.

## Fix prompt for AI coding agents

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

What it is: CVE-2024-35175 is a medium-severity vulnerability in tg123 sshpiper, published on 14 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-35175 exists.

Affected packages and fixed versions:
- github.com/tg123/sshpiper (Go): affected from 1.0.50; fixed in 1.3.0
- github.com/tg123/sshpiper (Go): affected from 1.0.50; fixed in 1.3.0
- github.com/tg123/sshpiper (Go): affected from 1.0.50; fixed in 1.3.0

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-35175/ (Markdown: https://insights.sbomify.com/CVE-2024-35175/index.md)
```

## Sources

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

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