Skip to content

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

Moderate severity GitHub Reviewed Published Apr 1, 2025 in phires/go-guerrilla • Updated Apr 2, 2025

Package

gomod github.com/phires/go-guerrilla (Go)

Affected versions

< 1.6.7

Patched versions

1.6.7

Description

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.

References

@phires phires published to phires/go-guerrilla Apr 1, 2025
Published by the National Vulnerability Database Apr 1, 2025
Published to the GitHub Advisory Database Apr 1, 2025
Reviewed Apr 1, 2025
Last updated Apr 2, 2025

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(16th percentile)

Weaknesses

CVE ID

CVE-2025-31135

GHSA ID

GHSA-c2c3-pqw5-5p7c

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.