Vulnerabilities in pkg:golang/github.com/phires/go-guerrilla

PACKAGE
Advisory Identifier: GHSA-hghq-53p7-c582
Advisory Summary

CVE-2026-115578 is a HIGH (CVSS 7.5) go-guerrilla crashes on a bare vulnerability (CWE-129: Improper Validation of Array Index) affecting Github.com/phires/go guerrilla libraries in the Go ecosystem. The issue involves go-guerrilla crashes on a bare xclient command (7-byte slice off-by-one panic). Remediation is available by upgrading affected packages to version 1.6.7-1.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/phires/go-guerrilla

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/phires/go-guerrilla. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-hghq-53p7-c582 CVE-2026-115578 HIGH go-guerrilla crashes on a bare XCLIENT command (7-byte slice off-by-one panic)
GHSA-c2c3-pqw5-5p7c CVE-2025-31135 MODERATE Go-Guerrilla SMTP Daemon allows the PROXY command to be sent multiple times

CVE-2026-115578 at a Glance

CVE Identifier CVE-2026-115578
GHSA Identifier GHSA-hghq-53p7-c582
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-129: Improper Validation of Array Index
Affected Product Github.com/phires/go guerrilla
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-115578

To remediate this vulnerability, upgrade all affected Github.com/phires/go guerrilla dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/phires/go-guerrilla fixed: Latest secure release
Upgrade github.com/phires/go-guerrilla to Latest secure release
github.com/phires/go-guerrilla fixed: 1.6.7-1
Upgrade github.com/phires/go-guerrilla to 1.6.7-1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/phires/go-guerrilla

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-115578, inspect your project dependencies for Github.com/phires/go guerrilla:

inspect dependencies for github.com/phires/go-guerrilla

Analyze the terminal output to locate any version of Github.com/phires/go guerrilla in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.7-1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-129: Improper Validation of Array Index, where the product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array. In Github.com/phires/go guerrilla, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The defect ---------- Confirmed 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): case sc.XClientOn && cmdXCLIENT.match(cmd): if toks := bytes.Split(input[8:], []byte{' '}); len(toks) > 0 { // line 586 A 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. Input and attacker ------------------- Connect 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. Verification level ------------------ EXECUTED 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). Suggested fix ------------- Guard 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. Also checked and SOUND ---------------------- The 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. Advisory-source note -------------------- Five-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. Dedup ----- Dedup gate clean: no phires/go-guerrilla blocking verdict in COVERED-INDEX, DISCLOSURE-INDEX or SCOUT-EXCLUDE. Tooling ------- AI assistance was used while investigating. The panic is executed-verified with a negative control (a bare XCLIENT crashes the real handleClient while XCLIENT with a trailing space returns 250), and the reporter confirmed at HEAD that cmdXCLIENT is 7 bytes while the handler slices input[8:] on a per-connection goroutine with no recover.

CVE-2026-115578 Affected Github.com/phires/go guerrilla Versions

2 component(s)
Fixed Versions:
1.6.7-1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/phires/go-guerrilla
Go
1.6.7
All 1 versions
1.6.7
None specified
github.com/phires/go-guerrilla
Go
< 1.6.7-1
1.6.7-1

References

Frequently Asked Questions

What is CVE-2026-115578?
CVE-2026-115578 is a security vulnerability in Github.com/phires/go guerrilla involving go-guerrilla crashes on a bare XCLIENT command (7-byte slice off-by-one panic) under CWE-129: Improper Validation of Array Index.
Which Github.com/phires/go guerrilla versions are affected?
Affected versions include releases prior to 1.6.7-1 across affected packages: github.com/phires/go-guerrilla.
What version fixes CVE-2026-115578?
Upgrading to 1.6.7-1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/phires/go-guerrilla affected?
Yes, github.com/phires/go-guerrilla is affected in releases prior to Latest secure release, 1.6.7-1. Upgrade your dependency to Latest secure release, 1.6.7-1 or later.
What is the CVSS score of CVE-2026-115578?
CVE-2026-115578 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-115578?
CVE-2026-115578 is classified under CWE-129: Improper Validation of Array Index (The product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array.).
How can I check Go dependencies for CVE-2026-115578?
Run the dependency tree command: 'inspect dependencies for github.com/phires/go-guerrilla'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hghq-53p7-c582",
  "modified" : "2026-11-20T14:42:18Z",
  "published" : "2026-11-20T14:42:18Z",
  "aliases" : [ "CVE-2026-115578" ],
  "summary" : "go-guerrilla crashes on a bare XCLIENT command (7-byte slice off-by-one panic)",
  "details" : "The 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 investigating. The panic is executed-verified with a negative control (a bare XCLIENT crashes the real handleClient while XCLIENT with a trailing space returns 250), and the reporter confirmed at HEAD that cmdXCLIENT is 7 bytes while the handler slices input[8:] on a per-connection goroutine with no recover.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/phires/go-guerrilla"
    },
    "versions" : [ "1.6.7" ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/phires/go-guerrilla"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.7-1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/phires/go-guerrilla/security/advisories/GHSA-hghq-53p7-c582"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-115578"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/phires/go-guerrilla/commit/b6deed97ff70f52bf34c386d33967694e7330d33"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/phires/go-guerrilla/commit/f0d0f2c40dcacf212e3a6a055ae67f7b412affc4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/phires/go-guerrilla"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/phires/go-guerrilla/releases/tag/v1.6.7-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-129", "CWE-193", "CWE-248" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-20T14:42:18Z",
    "nvd_published_at" : "2026-11-19T20:17:19Z"
  }
}