CVE-2025-31135
JSON

5.3medium

Go-Guerrilla SMTP Daemon allows the PROXY command to be sent multiple times

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.38% (higher than 34% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-c2c3-pqw5-5p7cGO-2025-3588

Description

Go-Guerrilla SMTP Daemon is a lightweight SMTP server written in Go. Prior to 1.6.7, when ProxyOn is enabled, 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. This vulnerability is fixed in 1.6.7.

Affected

Product or packageVersionsReported by
phires go-guerrilla< 1.6.7CVE List
github.com/phires/go-guerrilla (Go)before 1.6.7GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Classification

CWE-20

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Go-Guerrilla SMTP Daemon is a lightweight SMTP server written in Go. Prior to 1.6.7, when ProxyOn is enabled, 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. This vulnerability is fixed in 1.6.7.

GitHub Advisory Database
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.

Go Vulnerability Database

Go-Guerrilla SMTP Daemon allows the PROXY command to be sent multiple times in github.com/phires/go-guerrilla

NVD (es)

Go-Guerrilla SMTP Daemon es un servidor SMTP ligero escrito en Go. Antes de la versión 1.6.7, al habilitar ProxyOn, el comando PROXY se aceptaba varias veces, y las invocaciones posteriores anulaban las anteriores. El protocolo proxy solo admite una cabecera PROXY inicial; cualquier acción posterior se considera parte del intercambio entre el cliente y el servidor, por lo que el cliente puede enviar más comandos PROXY con los datos que desee. Go-Guerrilla los tratará como si provinieran del proxy inverso, lo que permite al cliente falsificar su dirección IP. Esta vulnerabilidad se corrigió en la versión 1.6.7.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-31135 changed 2026-01-28CVE Terms of Use
GitHub Advisory DatabaseGHSA-c2c3-pqw5-5p7c changed 2026-06-08CC-BY-4.0
Go Vulnerability DatabaseGO-2025-3588 changed 2026-03-03CC-BY-4.0
NVDCVE-2025-31135 changed 2026-06-17Public domain