Vulnerability record · CVE-2022-0218 · published 4 February 2022
CVE-2022-0218: WP HTML Mail plugin missing authorization enables unauthenticated stored XSS
Codemiq · Wordpress Email Template Designer
The WP HTML Mail WordPress plugin exposes the /themesettings REST-API endpoint without a capability check in includes/class-template-designer.php, affecting versions up to and including 3.0.9. Unauthenticated attackers can read and modify theme settings, and the description states they can inject malicious JavaScript into the site. The flaw combines missing authorization (CWE-862) with cross-site scripting (CWE-79).
Description
The WP HTML Mail WordPress plugin is vulnerable to unauthorized access which allows unauthenticated attackers to retrieve and modify theme settings due to a missing capability check on the /themesettings REST-API endpoint found in the ~/includes/class-template-designer.php file, in versions up to and including 3.0.9. This makes it possible for attackers with no privileges to execute the endpoint and add malicious JavaScript to a vulnerable WordPress site.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Automated analysis
high priorityUnauthenticated access to a settings endpoint that permits stored script injection is serious, and the very high EPSS score plus an exploit-tagged advisory indicate likely active interest.
What it is
The WP HTML Mail WordPress plugin exposes the /themesettings REST-API endpoint without a capability check in includes/class-template-designer.php, affecting versions up to and including 3.0.9. Unauthenticated attackers can read and modify theme settings, and the description states they can inject malicious JavaScript into the site. The flaw combines missing authorization (CWE-862) with cross-site scripting (CWE-79).
Impact
An attacker can change theme settings and plant malicious JavaScript that executes in the browser of site visitors or administrators. This enables session theft, credential capture, or arbitrary actions in the context of a victim's session.
Attack surface
Reachable over the network through the plugin's REST-API endpoint; no authentication is required per the description and CVSS vector (PR:N). The CVSS vector includes UI:R, so some user interaction is needed for the script to execute in a victim's browser.
Exploitation
Not listed in CISA KEV, but EPSS is 0.70511 (99.357th percentile), indicating high predicted exploitation activity. References include an Exploit-tagged Wordfence advisory, so public exploitation details exist.
What to do
- Update WP HTML Mail to a version newer than 3.0.9, which contains the patch referenced in the plugin changeset.
- If immediate patching is not possible, disable or remove the WP HTML Mail plugin until it can be updated.
- Restrict access to the WordPress REST API where feasible, and review any custom rules that expose plugin endpoints to unauthenticated users.
- Audit theme settings and templates for injected JavaScript or unexpected modifications, and restore from a known-good backup if tampering is found.
- Apply a web application firewall rule to block unauthenticated requests to the plugin's /themesettings endpoint.
Detection
- Monitor web server and WordPress logs for unauthenticated requests to the WP HTML Mail /themesettings REST-API endpoint.
- Inspect stored theme settings and email templates for unexpected script tags or JavaScript content.
- Review WordPress user and plugin activity logs for changes to WP HTML Mail settings made outside normal administrative sessions.
- Hunt for outbound or inline script content in rendered pages that references unexpected external domains.
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
| Link | Tags |
|---|---|
| https://plugins.trac.wordpress.org/changeset/2656984/wp-html-mail/trunk/includes/class-template-designer.php | PatchThird Party Advisory |
| https://www.wordfence.com/blog/2022/01/unauthenticated-xss-vulnerability-patched-in-html-email-template-designer-plugin/ | ExploitThird Party Advisory |
| https://plugins.trac.wordpress.org/changeset/2656984/wp-html-mail/trunk/includes/class-template-designer.php | PatchThird Party Advisory |
| https://www.wordfence.com/blog/2022/01/unauthenticated-xss-vulnerability-patched-in-html-email-template-designer-plugin/ | ExploitThird Party Advisory |
Track CVE-2022-0218 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-2022-0218), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.