CVE-2017-11503
Medium · 6.1CVSS
6.1
EPSS
2.4%
Published
Jul 20, 2017
CISA due date
—
Cloudanix analysis
A bug in an email address handling page lets attackers trick the application into running harmful code in a user's browser when that page is viewed.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Library
- Class
- XSS
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Cross-site scripting in the From and To email address input fields of code_generator.php allows injection and execution of arbitrary script in the context of users viewing the generated page.
Why it matters to the business
Attackers can hijack user sessions, redirect users to malicious sites, or perform unauthorized actions within the application, increasing risk of data exposure or account compromise in environments using the affected component.
How an attack unfolds
An attacker supplies a crafted email address containing malicious JavaScript to the vulnerable fields; when an administrator or user loads code_generator.php the script executes in the victim's browser, potentially stealing cookies or performing actions on behalf of the user. Public exploit code has been available for years but no named advanced persistent threat groups are tied to this specific flaw.
How to fix it
Upgrade prometheus-bind-exporter (Chainguard) to the fixed version 0 and prometheus-bind-exporter (Wolfi) to the fixed version 0; if a direct PHPMailer dependency is present, ensure PHPMailer 5.2.24 or later is used.
How to confirm the fix worked
Confirm the installed package version matches or exceeds the listed fixed versions and verify that the vulnerable code_generator.php no longer renders unsanitized email address input.
Typical attack path
- Identify a reachable instance exposing code_generator.php
- Craft a payload in the From or To email address field that contains executable script
- Trick a privileged user into viewing the generated output or submitting the form
- Execute script in the victim's browser to exfiltrate tokens or perform actions
How to detect it
Inspect web server access logs for requests to code_generator.php containing suspicious characters such as angle brackets or script tags in query or POST parameters; review browser history or proxy logs for unexpected script execution originating from the application.
- code_generator.php
- <script
- onerror=
- javascript:
What your security team should do
- Apply the listed fixed package versions immediately given the age of the vulnerability and public exploit availability
- Scan source and dependency trees for any remaining PHPMailer versions prior to 5.2.24
- Add web application firewall rules or input sanitization for email address fields as a compensating control
- Review application logs for any historical use of the code_generator.php endpoint
The record
PHPMailer 5.2.23 has XSS in the "From Email Address" and "To Email Address" fields of code_generator.php.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Packagist | phpmailer/phpmailer | 5.0.0 | 5.2.24 |
| Debian:10 | libphp-phpmailer | 0 | 6.0.6-0.1 |
| Debian:11 | libphp-phpmailer | 0 | 6.0.6-0.1 |
| Debian:12 | libphp-phpmailer | 0 | 6.0.6-0.1 |
| Debian:13 | libphp-phpmailer | 0 | 6.0.6-0.1 |
| Debian:14 | libphp-phpmailer | 0 | 6.0.6-0.1 |
| Mageia:5 | php-phpmailer | 0 | 5.2.24-1.mga5 |
| Mageia:6 | php-phpmailer | 0 | 5.2.24-1.mga6 |
| Ubuntu:Pro:16.04:LTS | libphp-phpmailer | 0 | 5.2.14+dfsg-1ubuntu0.1~esm2 |
| Ubuntu:Pro:16.04:LTS | libphp-phpmailer | 0 | 5.2.14+dfsg-1ubuntu0.1~esm1 |
| Ubuntu:Pro:18.04:LTS | libphp-phpmailer | 0 | 5.2.14+dfsg-2.3+deb9u2ubuntu0.1~esm2 |
| Ubuntu:Pro:18.04:LTS | libphp-phpmailer | 0 | 5.2.14+dfsg-2.3+deb9u2ubuntu0.1~esm1 |
| Ubuntu:Pro:20.04:LTS | libphp-phpmailer | 0 | 6.0.6-0.1ubuntu0.1~esm1 |
| Ubuntu:Pro:22.04:LTS | libphp-phpmailer | 0 | 6.2.0-2ubuntu0.1~esm1 |
| packagist | phpmailer/phpmailer | 5.0.0 | No fix |
| packagist | phpmailer/phpmailer | 6.0.0alpha0 | No fix |
Related vulnerabilities
- CVE-2016-10033 The mailSend function in the isMail transport in PHPMailer before 5.2.18 might allow… Also affects phpmailer/phpmailer
- CVE-2016-10045 The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass… Also affects phpmailer/phpmailer
- CVE-2008-5619 html2text.php in Chuggnutt HTML to Text Converter, as used in PHPMailer before 5.2.10… Also affects phpmailer/phpmailer
- CVE-2026-96379 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96382 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96368 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96361 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96362 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79