Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-8622 Overview
CVE-2024-8622 is a Reflected Cross-Site Scripting (XSS) vulnerability in the amCharts: Charts and Maps plugin for WordPress. The flaw affects all versions up to and including 1.4.4. The vulnerability resides in the amcharts_javascript parameter of the plugin's preview functionality, which accepts arbitrary JavaScript and lacks nonce validation. Unauthenticated attackers can craft malicious links that execute arbitrary web scripts in the victim's browser when clicked. The vulnerability is classified under [CWE-79] (Improper Neutralization of Input During Web Page Generation).
Critical Impact
Unauthenticated attackers can execute arbitrary JavaScript in a victim's browser session, enabling session hijacking, credential theft, and administrative account takeover through social engineering.
Affected Products
- amCharts: Charts and Maps plugin for WordPress, versions up to and including 1.4.4
- WordPress sites with the vulnerable plugin installed and activated
- All user contexts, including administrators, who interact with a crafted link
Discovery Timeline
- 2024-09-12 - CVE-2024-8622 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-8622
Vulnerability Analysis
The vulnerability exists in the plugin's preview functionality, implemented in includes/preview.php. The amcharts_javascript request parameter is reflected into the rendered page without adequate output encoding or contextual sanitization. Because the endpoint also omits WordPress nonce validation, no anti-CSRF token is required to reach the vulnerable code path.
An unauthenticated attacker crafts a URL containing malicious JavaScript in the amcharts_javascript parameter. When a victim clicks the link, the injected payload executes in the origin of the WordPress site. Actions available to the attacker include stealing authentication cookies, performing administrative operations on behalf of a logged-in user, and modifying rendered page content to deliver secondary payloads.
See the WordPress Plugin Preview Script and the Wordfence Vulnerability Analysis for the vulnerable source and technical breakdown.
Root Cause
The root cause is twofold. First, the preview handler accepts arbitrary JavaScript through the amcharts_javascript parameter and reflects it into the response without escaping. Second, the endpoint does not enforce a WordPress nonce, so no session-bound token is required to invoke the preview. Together, these gaps enable trivial reflected XSS via a crafted URL.
Attack Vector
The attack vector is network-based and requires user interaction. An attacker distributes a malicious link through email, chat, social media, or a compromised third-party site. When an authenticated WordPress user, especially an administrator, clicks the link, the injected script executes within the WordPress origin. Exploitation does not require credentials or prior access to the target site.
The vulnerability manifests when a request such as /wp-content/plugins/amcharts-charts-and-maps/includes/preview.php?amcharts_javascript=<payload> is loaded in an authenticated browser session. Refer to the Wordfence Vulnerability Analysis for exploitation details.
Detection Methods for CVE-2024-8622
Indicators of Compromise
- HTTP requests to preview.php under the amcharts-charts-and-maps plugin path containing an amcharts_javascript parameter
- Parameter values containing HTML or JavaScript tokens such as <script>, onerror=, onload=, javascript:, or encoded equivalents
- Referrer headers pointing to external, untrusted domains for requests targeting the plugin's preview endpoint
- Unexpected outbound requests from administrative browser sessions immediately after visiting a crafted URL
Detection Strategies
- Inspect web server access logs for GET requests to the plugin preview endpoint carrying amcharts_javascript values with script-like content
- Deploy web application firewall (WAF) rules that flag reflected XSS patterns in query parameters targeting WordPress plugin paths
- Enable a strict Content Security Policy (CSP) and monitor report-uri or report-to endpoints for inline script violations
- Correlate suspicious plugin requests with subsequent administrative actions such as user creation or plugin installation
Monitoring Recommendations
- Alert on any request to amcharts-charts-and-maps/includes/preview.php when the plugin has been upgraded or should not be publicly reachable
- Track WordPress plugin inventory and versions to identify hosts still running amCharts 1.4.4 or earlier
- Monitor administrator session activity for anomalies such as new privileged users, unexpected option changes, or theme edits
How to Mitigate CVE-2024-8622
Immediate Actions Required
- Update the amCharts: Charts and Maps plugin to a version later than 1.4.4 that includes the fix from WordPress Changeset #3150041
- If an update is not immediately possible, deactivate and remove the plugin until patching is complete
- Rotate WordPress administrator passwords and invalidate active sessions if the plugin has been exposed to the internet
- Review recent administrative actions and installed plugins for signs of unauthorized changes
Patch Information
The vendor addressed CVE-2024-8622 in WordPress Changeset #3150041, which adds output handling and access controls to the preview functionality. Site operators should upgrade to the patched release available through the WordPress plugin repository. Confirm the installed version reports higher than 1.4.4 after the update.
Workarounds
- Block external HTTP requests to wp-content/plugins/amcharts-charts-and-maps/includes/preview.php at the WAF or reverse proxy layer
- Restrict access to the preview endpoint to authenticated administrator IP ranges only
- Enforce a Content Security Policy that disallows inline scripts and untrusted script sources to limit the impact of reflected XSS
- Train administrators to avoid clicking untrusted links while logged into the WordPress dashboard
# Example nginx rule to block external access to the vulnerable preview endpoint
location ~* /wp-content/plugins/amcharts-charts-and-maps/includes/preview\.php$ {
allow 10.0.0.0/8; # internal admin network
deny all;
return 403;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

