{"vuln_id":"CVE-2026-115578","aliases":["GHSA-hghq-53p7-c582","CVE-2025-31135"],"description":"go-guerrilla crashes on a bare XCLIENT command (7-byte slice off-by-one panic)","published_at":"2026-11-19T20:17:19.797000Z","modified_at":"2026-11-20T15:00:07.726946Z","first_seen_at":"2026-11-21T19:15:19.285362Z","severity":"high","severity_source":"nvd","cvss_score":7.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cwe":["CWE-129","CWE-193","CWE-248"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00623,"epss_percentile":0.50789,"nvd_status":"Received","enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-115578"},"matched_alias":null,"items":[{"id":10958,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-hghq-53p7-c582: go-guerrilla crashes on a bare XCLIENT command (7-byte slice off-by-one panic)","summary":"go-guerrilla crashes on a bare XCLIENT command (7-byte slice off-by-one panic)\n\nThe defect\n----------\nConfirmed at HEAD. server.go: cmdXCLIENT = []byte(\"XCLIENT\") is 7 bytes (line 78), so the dispatch match cmdXCLIENT.match(cmd) only guarantees len(input) >= 7. The handler then slices input[8:] (line 586):\n\n    case sc.XClientOn && cmdXCLIENT.match(cmd):\n        if toks := bytes.Split(input[8:], []byte{' '}); len(toks) > 0 {   // line 586\n\nA client sending the bare command XCLIENT (exactly 7 bytes) hits input[8:7] and panics runtime error: slice bounds out of range [8:7]. handleClient runs in the per-connection goroutine (server.go:391) which has no recover(); the only recover() calls are in the backend mail-processing workers (a different goroutine never reached during command parsing), so the unrecovered panic crashes the whole SMTP daemon.\n\nInput and attacker\n-------------------\nConnect to the SMTP port, then send XCLIENT\\r\\n (a bare LF also works; no HELO needed). Precondition: xclient_on: true (off by default, but a documented nginx-fronted deployment; go-guerrilla does not restrict who may send XCLIENT). Attacker model: any unauthenticated client on the SMTP port.\n\nVerification level\n------------------\nEXECUTED with a negative control (agent-run, driving the real server.handleClient with XClientOn=true over the suite's mock net.Conn). The bare XCLIENT panics with the exact OOB; the negative control XCLIENT with a trailing space (8 bytes) does not panic and returns 250. The upstream TestXClient tests XCLIENT ADDR=... and XCLIENT c but never the bare 7-byte form (the missing regression case). I independently re-confirmed at HEAD that cmdXCLIENT is 7 bytes (server.go:78), that the handler slices input[8:] (server.go:586), and that handleClient (server.go:391) has no recover. NOT verified: did not stand up a standalone daemon on a real socket to observe OS-level process exit (used the mock net.Conn plus the traced absence of recover; crash-to-exit is standard Go runtime behavior).\n\nSuggested fix\n-------------\nGuard the slice against the exact-verb-length case: require len(input) > len(cmdXCLIENT)+1 (or slice at the verb length and trim) before input[8:]. A recover in the per-connection handleClient loop would also contain any residual command-parse panic to the single connection.\n\nAlso checked and SOUND\n----------------------\nThe rfc5321 recursive-descent parser (MAIL/RCPT/HELO/EHLO/address) is bounds-safe (next()/peek() return 0 at EOF), and the line/size/recipient caps are enforced. XCLIENT is the only off-by-one; every other command arm slices exactly at its verb length.\n\nAdvisory-source note\n--------------------\nFive-source enumeration (repo advisories, OSV, NVD, the global GitHub DB, no vendor CNA) shows the PROXY-header IP-spoof bug (CVE-2025-31135, fixed v1.6.7) is the only published advisory; this XCLIENT panic is undisclosed and not contested.\n\nDedup\n-----\nDedup gate clean: no phires/go-guerrilla blocking verdict in COVERED-INDEX, DISCLOSURE-INDEX or SCOUT-EXCLUDE.\n\nTooling\n-------\nAI assistance was used while inv\n\nAffected: Go:github.com/phires/go-guerrilla\n\nFixed in: 1.6.7-1\n\nReferences:\nhttps://github.com/phires/go-guerrilla/security/advisories/GHSA-hghq-53p7-c582\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-115578\nhttps://github.com/phires/go-guerrilla/commit/b6deed97ff70f52bf34c386d33967694e7330d33\nhttps://github.com/phires/go-guerrilla/commit/f0d0f2c40dcacf212e3a6a055ae67f7b412affc4\nhttps://github.com/phires/go-guerrilla\nhttps://github.com/phires/go-guerrilla/releases/tag/v1.6.7-1","url":"https://osv.dev/vulnerability/GHSA-hghq-53p7-c582","published_at":"2026-11-20T14:42:18Z","updated_at":"2026-11-20T15:00:07.726946Z","fetched_at":"2026-11-21T19:15:55.946330Z","severity":"high","cvss_score":7.5,"epss":0.00623,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/phires/go-guerrilla","vuln_id":"CVE-2026-115578","vuln_ids":["CVE-2025-31135","CVE-2026-115578","GHSA-HGHQ-53P7-C582"],"tags":["osv","go","fix-available"],"cluster_id":2040,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10958","html":"https://vulnwatch.ve1ve2.com/item/10958"}},{"id":2311,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-hghq-53p7-c582 / CVE-2026-115578: go-guerrilla crashes on a bare XCLIENT command (7-byte slice off-by-one panic)","summary":"go-guerrilla crashes on a bare XCLIENT command (7-byte slice off-by-one panic)\n\nThe defect\n----------\nConfirmed at HEAD. server.go: cmdXCLIENT = []byte(\"XCLIENT\") is 7 bytes (line 78), so the dispatch match cmdXCLIENT.match(cmd) only guarantees len(input) >= 7. The handler then slices input[8:] (line 586):\n\n    case sc.XClientOn && cmdXCLIENT.match(cmd):\n        if toks := bytes.Split(input[8:], []byte{' '}); len(toks) > 0 {   // line 586\n\nA client sending the bare command XCLIENT (exactly 7 bytes) hits input[8:7] and panics runtime error: slice bounds out of range [8:7]. handleClient runs in the per-connection goroutine (server.go:391) which has no recover(); the only recover() calls are in the backend mail-processing workers (a different goroutine never reached during command parsing), so the unrecovered panic crashes the whole SMTP daemon.\n\nInput and attacker\n-------------------\nConnect to the SMTP port, then send XCLIENT\\r\\n (a bare LF also works; no HELO needed). Precondition: xclient_on: true (off by default, but a documented nginx-fronted deployment; go-guerrilla does not restrict who may send XCLIENT). Attacker model: any unauthenticated client on the SMTP port.\n\nVerification level\n------------------\nEXECUTED with a negative control (agent-run, driving the real server.handleClient with XClientOn=true over the suite's mock net.Conn). The bare XCLIENT panics with the exact OOB; the negative control XCLIENT with a trailing space (8 bytes) does not panic and returns 250. The upstream TestXClient tests XCLIENT ADDR=... and XCLIENT c but never the bare 7-byte form (the missing regression case). I independently re-confirmed at HEAD that cmdXCLIENT is 7 bytes (server.go:78), that the handler slices input[8:] (server.go:586), and that handleClient (server.go:391) has no recover. NOT verified: did not stand up a standalone daemon on a real socket to observe OS-level process exit (used the mock net.Conn plus the traced absence of recover; crash-to-exit is standard Go runtime behavior).\n\nSuggested fix\n-------------\nGuard the slice against the exact-verb-length case: require len(input) > len(cmdXCLIENT)+1 (or slice at the verb length and trim) before input[8:]. A recover in the per-connection handleClient loop would also contain any residual command-parse panic to the single connection.\n\nAlso checked and SOUND\n----------------------\nThe rfc5321 recursive-descent parser (MAIL/RCPT/HELO/EHLO/address) is bounds-safe (next()/peek() return 0 at EOF), and the line/size/recipient caps are enforced. XCLIENT is the only off-by-one; every other command arm slices exactly at its verb length.\n\nAdvisory-source note\n--------------------\nFive-source enumeration (repo advisories, OSV, NVD, the global GitHub DB, no vendor CNA) shows the PROXY-header IP-spoof bug (CVE-2025-31135, fixed v1.6.7) is the only published advisory; this XCLIENT panic is undisclosed and not contested.\n\nDedup\n-----\nDedup gate clean: no phires/go-guerrilla blocking verdict in COVERED-INDEX, DISCLOSURE-INDEX or SCOUT-EXCLUDE.\n\nTooling\n-------\nAI assistance was used while inv\n\nAffected packages: go:github.com/phires/go-guerrilla\nPatched: github.com/phires/go-guerrilla 1.6.7-1","url":"https://github.com/advisories/GHSA-hghq-53p7-c582","published_at":"2026-11-20T14:42:18Z","updated_at":"2026-11-20T14:42:22Z","fetched_at":"2026-11-21T19:15:18.416741Z","severity":"high","cvss_score":7.5,"epss":0.00623,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/phires/go-guerrilla","vuln_id":"CVE-2026-115578","vuln_ids":["CVE-2025-31135","CVE-2026-115578","GHSA-HGHQ-53P7-C582"],"tags":["ghsa","go","CWE-129","CWE-193","CWE-248"],"cluster_id":2040,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2311","html":"https://vulnwatch.ve1ve2.com/item/2311"}},{"id":9100,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-115578: Go-Guerrilla SMTP Daemon is a lightweight SMTP server written in Go. In 1.6.7 and earlier, according to the repository advisory's structured affected range, se…","summary":"Go-Guerrilla SMTP Daemon is a lightweight SMTP server written in Go. In 1.6.7 and earlier, according to the repository advisory's structured affected range, server.go defines the seven-byte cmdXCLIENT token, but the XCLIENT handler slices input[8:] after matching only that seven-byte verb, so a bare command causes an out-of-bounds panic in handleClient and terminates the daemon because that connection goroutine does not recover the panic. The issue is reachable by an unauthenticated client when the non-default xclient_on setting is enabled; no HELO command is required. The repository fix is present in version 1.6.7-1.\n\nReferences:\nhttps://github.com/phires/go-guerrilla/commit/b6deed97ff70f52bf34c386d33967694e7330d33\nhttps://github.com/phires/go-guerrilla/commit/f0d0f2c40dcacf212e3a6a055ae67f7b412affc4\nhttps://github.com/phires/go-guerrilla/releases/tag/v1.6.7-1\nhttps://github.com/phires/go-guerrilla/security/advisories/GHSA-hghq-53p7-c582","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115578","published_at":"2026-11-19T20:17:19.797000Z","updated_at":"2026-11-20T14:17:43.990000Z","fetched_at":"2026-11-21T19:15:31.484741Z","severity":"high","cvss_score":7.5,"epss":0.00623,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-115578","vuln_ids":["CVE-2025-31135","CVE-2026-115578","GHSA-HGHQ-53P7-C582"],"tags":["CWE-129","CWE-193","CWE-248"],"cluster_id":2041,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/9100","html":"https://vulnwatch.ve1ve2.com/item/9100"}}]}