llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/phires/go-guerrilla

GHSA-HGHQ-53P7-C582

go-guerrilla crashes on a bare XCLIENT command (7-byte slice off-by-one panic)

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.5
Alta
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -114 d de la divulgación
Exposición1 dDesde la divulgación, 20 nov 2026, 9:42 a. m.
Detección1 minDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Hoy es tranquila, pero podría madrugarte.Ni alarma ni olvido: seguimiento.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche v1.6.7-1
Monitoreo
Detectada
Fuente: GitHub Security Advisories +2
29 jul 26
19 nov 26
20 nov 26
21 nov 26
29 jul 26
27 ago 26
25 sept 26
24 oct 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche v1.6.7-1 github.com/phires/go-guerrilla · -114 d desde divulgación
Monitoreo Detectada Ingresó al índice
Divulgación Publicada GHSA-HGHQ-53P7-C582 divulgada · CVSS 7.5 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Fuente: GitHub Security Advisories Registro visto por primera vez en GitHub Security Advisories
Monitoreo Fuente: OSV Registro visto por primera vez en OSV
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

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.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
10.0/ 10Muy alto
Vector 10.0 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
github.com/phires/go-guerrilla< 1.6.7-1
v1.6.7
1.6.7-1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/phires/go-guerrilla
Corregida v1.6.7-1 -114 d v1.6.7 afectada
Versiones corregidas1.6.7-1v1.6.7-1
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-115578
Otrahttps://github.com/phires/go-guerrilla/security/advisories/GHSA-hghq-53p7-c582
Otrahttps://github.com/phires/go-guerrilla/commit/b6deed97ff70f52bf34c386d33967694e7330d33
Otrahttps://github.com/phires/go-guerrilla/commit/f0d0f2c40dcacf212e3a6a055ae67f7b412affc4
Otrahttps://github.com/phires/go-guerrilla
Otrahttps://github.com/phires/go-guerrilla/releases/tag/v1.6.7-1

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.