CVE-2025-31135: Go-Guerrilla SMTP Daemon allows the PROXY command to be sent multiple times
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;
Published Apr 1, 2025 · Updated Jun 8, 2026
Affected packages
github.com/phires/go-guerrilla
- Ecosystem
- Go
- Affected
- < 1.6.7
- Fixed in
- 1.6.7
- Check
go list -m github.com/phires/go-guerrilla
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to Zenexer, cookesan.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
