GHSA-89FJ-JXGM-9RQ6
CRLF / Header Injection in `MailService::sendSendmail()`
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-89FJ-JXGM-9RQ6 divulgada · CVSS 3.1 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Hi, I analyzed this project from a cybersecurity perspective and identified some issues.
I would appreciate it if you could credit my GitHub account (https://github.com/xhydraxOffSec) as the person who reported these cybersecurity issues.
CRLF / Header Injection in `MailService::sendSendmail()`
CWE: CWE-93 (Improper Neutralization of CRLF Sequences)
Severity: Medium (conditional — see preconditions below)
Affected file: `lib/Application/Service/MailService.php`, method `sendSendmail()` (lines ~160–200)
Description
When the `sendmail` mail transport is configured (`mail.transport = sendmail` in the application config), outgoing email headers are written directly to the `sendmail` process via `fputs()` with no CRLF sanitization or validation on the `$to` / `$subject` values:
fputs($sendmail, "To: $to\r\n");
fputs($sendmail, "Subject: $subject\r\n");
foreach ($mailHeaders as $name => $value) {
fputs($sendmail, "$name: $value\r\n");
}If either `$to` or `$subject` can contain an embedded `\r\n` sequence by the time it reaches this method, an attacker can inject arbitrary additional headers (e.g. `Bcc:`, `Cc:`, or a second `To:`) into the outgoing message, or terminate the header block early to inject into the message body.
Note this is specific to the `sendmail` transport implementation (`sendSendmail()`); the `smtp` transport (`sendSmtp()`, via Symfony Mailer) builds messages with `Email::to()` / `addTextHeader()`, which properly encode/validate header values and are not affected.
---
Maintainer note: I checked this against all the 4.x lines. Only the sendmail transport is affected, the default php transport and smtp are fine. The address has to get into a user's stored email first, which in practice means an API v2 user update or an address coming from an OIDC/SAML/LDAP provider, so I lowered it to low. It goes back to 4.0.0, not just 4.3.5, although before 4.2.6 the default sendmail flags didn't deliver piped mail at all.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistpoweradmin/poweradmin |
Corregida | 4.2.7, 4.3.6, 4.4.2 | — | — |
4.2.74.3.64.4.2Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/poweradmin/poweradmin/security/advisories/GHSA-89fj-jxgm-9rq6Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
