GHSA-WX75-C4FP-Q5PV
HTML Injection in Email Notifications
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-WX75-C4FP-Q5PV divulgada · CVSS 3.5 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Due to a lack of input sanitization, any user with "Editor" permissions or higher on a project can perform HTML injection in email notifications.
Details
User input from setting board/canvas titles is not properly sanitized to entity encode special HTML characters before sending them in email notifications.
The following files are vulnerable:
- `app/Domain/Canvas/Controllers/BoardDialog.php`
- `app/Domain/Canvas/Controllers/ShowCanvas.php`
- `app/Domain/Goalcanvas/Controllers/Dashboard.php`
- `app/Domain/Goalcanvas/Controllers/ShowCanvas.php`
- `app/Domain/Ideas/Controllers/AdvancedBoards.php`
- `app/Domain/Ideas/Controllers/BoardDialog.php`
- `app/Domain/Ideas/Controllers/ShowBoards.php`
Each of these files contain the same notification logic to send email notifications when a new board/canvas is created.
$values = [
'title' => $_POST['canvastitle'],
'author' => session('userdata.id'),
'projectId' => session('currentProject'),
];
$currentCanvasId = $this->canvasRepo->addCanvas($values);
$allCanvas = $this->canvasRepo->getAllCanvas(session('currentProject'));
$mailer = app()->make(MailerCore::class);
$this->projectService = app()->make(ProjectService::class);
$users = $this->projectService->getUsersToNotify(session('currentProject'));
$mailer->setSubject($this->language->__('notification.board_created'));
$actual_link = CURRENT_URL;
$message = sprintf(
$this->language->__('email_notifications.canvas_created_message'),
session('userdata.name'),
"<a href='".$actual_link."'>".$values['title'].'</a>'
);
$mailer->setHtml($message);
// New queuing messaging system
$queue = app()->make(QueueRepository::class);
$queue->queueMessageToUsers(
$users,
$message,
$this->language->__('notification.board_created'),
session('currentProject')
);Since `$values['title']` is not sanitized to entity encode special HTML characters, user input can be interpreted as HTML.
PoC
- Create a new project.
- Add another user to the project team, ensuring they have "Editor" permissions or higher.
- Login as that user and navigate to any of the options under "THINK" on the sidebar menu. If "Blueprints" is chosen, select any of the board/canvas options.
!1 https://github.com/user-attachments/assets/8210d631-cc96-4dcd-b5fe-c2b42ede2b73
- Click on the dropdown menu where the board/canvas title is and click "Create New Board".
!2 https://github.com/user-attachments/assets/91d537a3-41ac-461e-b48c-3829da009021
- Input `</a><a href="https://example.com">Malicious Link` and click "Create Board".
!3 https://github.com/user-attachments/assets/6c9be9c6-b58e-43aa-b57b-8ffd1285f24b
- Wait a minute for notifications to be sent then check the email of the original user who created the project. Notice that a link to `https://example.com` is included under the text "Malicious Link".
!4 https://github.com/user-attachments/assets/fcccd849-7851-4a79-94c0-ab491e35da28
Impact
This vulnerability can be utilized by a malicious attacker to completely change notification email content, allowing users to be redirected to other sites, phished, or be blocked from accessing regular notifications.
Remediation
Use the PHP `htmlentities` function to sanitize user input. All mentioned files can be modified to include it.
$values = [
'title' => htmlentities($_POST['canvastitle']),
'author' => session('userdata.id'),
'projectId' => session('currentProject'),
];Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistleantime/leantime |
Corregida | 3.4.0 | — | — |
3.4.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/Leantime/leantime/security/advisories/GHSA-wx75-c4fp-q5pvLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
