GHSA-WJF7-8R24-63WR
OS Command Injection via Sendmail Path Mail Setting
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-WJF7-8R24-63WR divulgada · CVSS 3.8 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
The Mail Configuration page's `sendmail_path` field on `System\Models\MailSetting` accepted a free-text string without validation. Laravel copies the stored value into `mail.mailers.sendmail.path`, and Symfony's `SendmailTransport` passes it to `proc_open($command, ...)` as a shell command string. Any shell metacharacter in the value (e.g. `;`, `` ` ``, `$(...)`) therefore executed as a second command whenever the application sent mail via the sendmail transport.
A backend user holding `mail.settings` (but not superuser) could store a payload such as `/usr/sbin/sendmail -t; /bin/touch /tmp/pwn; #` and trigger execution by any code path that sends mail (password restore, notifications, etc.). The `-t` prefix satisfied Symfony's internal argument check; the injected command ran as the PHP process user.
Impact
- OS command execution as the PHP process user when the sendmail transport is invoked
- Reachable by any backend user holding `mail.settings` on installations where `backend.force_mail_setting` is left at its default of `false`
- No exposure on installations that force mail configuration via server-side config (`backend.force_mail_setting = true`)
Patches
The vulnerability has been patched in v4.3.5. `MailSetting` now validates `sendmail_path` against a regex that rejects shell metacharacters (`;`, `&`, `|`, `` ` ``, `$`, `(`, `)`, `<`, `>`, newlines, backslash) before save. Legitimate values like `/usr/sbin/sendmail -bs` continue to pass.
Workarounds
If upgrading immediately is not possible:
- Set `backend.force_mail_setting = true` and configure the mail transport in server-side config
- Revoke `mail.settings` from all non-super-user roles
- Review the current stored value of `sendmail_path` in `system_settings` for unexpected metacharacters
References
- Reported by CodingRule
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistoctober/system |
Corregida | 4.3.4 | — | — |
4.3.4Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/octobercms/october/security/advisories/GHSA-wjf7-8r24-63wrLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
