Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-c2c3-pqw5-5p7c
No affected components available
Summary
The PROXY command is accepted multiple times, allowing a client to spoof its IP address when the proxy protocol is being used.
Details
When ProxyOn is enabled, it looks like the PROXY command will be accepted multiple times, with later invocations overriding earlier ones. The proxy protocol only supports one initial PROXY header; anything after that is considered part of the exchange between client and server, so the client is free to send further PROXY commands with whatever data it pleases. go-guerrilla will treat these as coming from the reverse proxy, allowing a client to spoof its IP address.
Note that the format of the PROXY header is well-defined. It probably shouldn't be treated as an SMTP command; parsing it the same way is likely to result in odd behavior and could lead to other vulnerabilities.
PoC
I'm working on writing a PR to fix this vulnerability. It'll include a unit test that will serve as a PoC on the current version.
Impact
Any instance with ProxyOn enabled (proxyon in the JSON config) is affected.
As far as I'm able to tell, the impact is limited to spoofing the RemoteIP field. This isn't ideal, but it probably has less practical impact on an MTA than, say, a web server.
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a low impact on the integrity of the data.
Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard