Vulnerability record · CVE-2008-5619 · published 17 December 2008
CVE-2008-5619: PHPMailer html2text.php preg_replace eval code injection
Roundcube · Webmail
The html2text.php converter bundled with PHPMailer before 5.2.10 (and used by RoundCube Webmail, Mahara and AtMail Open) passes crafted input into preg_replace with the eval switch, allowing injected PHP to run. Because the same library is embedded in multiple webmail and CMS products, a single flaw exposes several applications.
Description
html2text.php in Chuggnutt HTML to Text Converter, as used in PHPMailer before 5.2.10, RoundCube Webmail (roundcubemail) 0.2-1.alpha and 0.2-3.beta, Mahara, and AtMail Open 1.03, allows remote attackers to execute arbitrary code via crafted input that is processed by the preg_replace function with the eval switch.
AV:N/AC:L/Au:N/C:C/I:C/A:C
Automated analysis
critical priorityUnauthenticated remote code execution with a CVSS 2.0 score of 10, public exploit code and a very high EPSS percentile.
What it is
The html2text.php converter bundled with PHPMailer before 5.2.10 (and used by RoundCube Webmail, Mahara and AtMail Open) passes crafted input into preg_replace with the eval switch, allowing injected PHP to run. Because the same library is embedded in multiple webmail and CMS products, a single flaw exposes several applications.
Impact
An unauthenticated remote attacker can execute arbitrary code in the context of the web server, leading to full compromise of the host and any data it can reach.
Attack surface
Reachable over the network with no authentication and no user interaction, per the AV:N/AC:L/Au:N vector; the crafted input is whatever text the application feeds to the html2text conversion routine.
Exploitation
Not listed in CISA KEV, but EPSS is 0.586 (99th percentile) and multiple references carry Exploit tags, including RoundCube changesets and Exploit-DB entries 7549 and 7553, indicating public exploit code exists.
What to do
- Upgrade PHPMailer to 5.2.10 or later, and update RoundCube, Mahara and AtMail Open to versions that bundle the fixed library.
- If immediate upgrade is impossible, remove or disable the html2text.php converter and avoid passing untrusted input to it.
- Search deployed code for copies of html2text.php and the preg_replace/eval pattern, since the library is often vendored rather than centrally managed.
- Restrict outbound and lateral network access from web servers running the affected applications to limit post-exploitation movement.
Detection
- Scan web server and application logs for requests containing PHP code or preg_replace modifiers such as /e in text submitted to conversion endpoints.
- Monitor for unexpected child processes, file writes or outbound connections spawned by the web server user.
- Inventory hosts and containers for PHPMailer versions below 5.2.10 and for embedded html2text.php files.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
Track CVE-2008-5619 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2008-5619), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.