Medium, CVSS 5.3GoPublished
sshpiper's enabling of proxy protocol without proper feature flagging allows faking source address
CVE-2024-35175 · GHSA-4w53-6jvp-gg52
- Affected
- Go github.com/tg123/sshpiper >= 1.0.50, < 1.3.0
- Fixed in
- 1.3.0· Vendor fix available
- Issue
- The way the proxy protocol listener is implemented in sshpiper can allow an attacker to forge their connecting address. Details This commit 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. PoC You can use a configuration like this in HAProxy: When connecting through HAProxy, sshpiper will log connections as originating from 1.1.1.1. The proxy protocol data is designed to survive multiple load balancers or proxies and pass through to sshpiper at the end, so it should only be enabled trusted environments. This should be behind a configuration option or startup flag to prevent abuse when public connections can be made to sshpiper. This is also backed up by the specification for proxy protocol: The receiver MUST be configured to only receive the protocol described…
Recommended action: Upgrade to 1.3.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.