Phar object injection in PHPMailer
PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing phar:// paths into addAttachment() and other functions that may receive unfiltered local paths, possibly leading to RCE. See this article for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as phar://. Reported by Sehun Oh of cyberone.kr.
Impact
Object injection, possible remote code execution
Patches
Fixed in 6.0.6 and 5.2.27
Workarounds
Validate and sanitise user input before using.
References
https://nvd.nist.gov/vuln/detail/CVE-2018-19296
For more information
If you have any questions or comments about this advisory:
- Open a private issue in the PHPMailer project
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de Composer | phpmailer/phpmailer | >= 5.0.0, < 5.2.27, >= 6.0.0, < 6.0.6 | 5.2.27, 6.0.6 |
Referencias
- https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-7w4p-72j7-v7c2
- https://nvd.nist.gov/vuln/detail/CVE-2018-19296
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2018-19296.yaml
- https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.27
- https://github.com/PHPMailer/PHPMailer/releases/tag/v6.0.6
- https://lists.debian.org/debian-lts-announce/2018/12/msg00020.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT
- https://www.debian.org/security/2018/dsa-4351
- Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H- Debilidad (CWE)
CWE-1321, CWE-502, CWE-915- Plataforma
- Composer
- Paquete
phpmailer/phpmailer- Publicada
- 05.03.2020
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-7w4p-72j7-v7c2 - CC BY 4.0
Historial de vulnerabilidades: phpmailer/phpmailer
Todas las vulnerabilidades publicadas de este paquete (Paquete de Composer), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 13
- Primera → última
- 12.2016 02.2024
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Crítica 2
- Alta 7
- Media 3
- Baja 1
Divulgaciones por año
- 2017: 0
- 2018: 0
- 2019: 0
- 2020: 5
- 2021: 3
- 2022: 2
- 2023: 0
- 2024: 2
- 2025: 0
- 2026: 0
antes: 1
-
Phar object injection in PHPMailer esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.