GHSA-c2c3-pqw5-5p7c

Suggest an improvement
Source
https://github.com/advisories/GHSA-c2c3-pqw5-5p7c
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/04/GHSA-c2c3-pqw5-5p7c/GHSA-c2c3-pqw5-5p7c.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-c2c3-pqw5-5p7c
Aliases
Published
2025-04-01T22:23:49Z
Modified
2025-04-02T16:56:49.045080Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
Go-Guerrilla SMTP Daemon allows the PROXY command to be sent multiple times
Details

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.

Database specific
{
    "nvd_published_at": "2025-04-01T22:15:21Z",
    "cwe_ids": [
        "CWE-20"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2025-04-01T22:23:49Z"
}
References

Affected packages

Go / github.com/phires/go-guerrilla

Package

Name
github.com/phires/go-guerrilla
View open source insights on deps.dev
Purl
pkg:golang/github.com/phires/go-guerrilla

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.6.7