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-5638 Overview
CVE-2024-5638 is a Reflected Cross-Site Scripting (XSS) vulnerability in the Formula theme for WordPress developed by Awplife. The flaw resides in the ti_customizer_notify_dismiss_recommended_plugins AJAX action, where the id parameter is processed without sufficient input sanitization or output escaping. All versions of the theme up to and including 0.5.1 are affected. Unauthenticated attackers can inject arbitrary JavaScript that executes in a victim's browser when the victim is tricked into clicking a crafted link. The issue is categorized under CWE-79 (Improper Neutralization of Input During Web Page Generation).
Critical Impact
Unauthenticated attackers can execute arbitrary scripts in a victim's browser session, enabling session theft, administrative account takeover, and content manipulation on affected WordPress sites.
Affected Products
- Awplife Formula WordPress theme, all versions through 0.5.1
- Free distribution of the theme hosted on the WordPress theme repository
- WordPress installations using the vulnerable formula-customizer-notify.php component
Discovery Timeline
- 2024-06-08 - CVE-2024-5638 published to the National Vulnerability Database
- 2026-06-17 - Last updated in the NVD database
Technical Details for CVE-2024-5638
Vulnerability Analysis
The vulnerability affects the WordPress customizer notice component shipped with the Formula theme. The AJAX handler bound to ti_customizer_notify_dismiss_recommended_plugins reads the id request parameter and reflects its value into the response or page output without escaping. Because the handler is registered for unauthenticated AJAX access, any visitor can trigger the sink.
An attacker crafts a URL that submits malicious script content through the id parameter. When a logged-in administrator clicks the link, the injected JavaScript executes in the context of the WordPress origin. The attacker can then perform actions permitted to the victim, including creating privileged accounts, modifying theme or plugin files, and exfiltrating session cookies.
Root Cause
The root cause is missing input validation and output escaping in the formula-customizer-notify.php file. The handler trusts the client-supplied id value and does not apply WordPress sanitization helpers such as sanitize_text_field() or escaping functions such as esc_html() and esc_attr() before returning the value. The upstream fix is documented in WordPress Changeset #230569.
Attack Vector
Exploitation requires user interaction. The attacker must deliver a crafted URL or embed it in a page the victim visits, commonly through phishing, forum posts, or malicious advertising. The attack is launched over the network against the vulnerable AJAX endpoint, and the scope is changed because script execution crosses from the server-controlled origin into the victim's authenticated browser context. Technical details of the vulnerable code path are referenced in the WordPress Customizer Notice Code and the Wordfence Vulnerability Analysis.
Detection Methods for CVE-2024-5638
Indicators of Compromise
- Web server access logs containing requests to admin-ajax.php with action=ti_customizer_notify_dismiss_recommended_plugins and an id parameter containing HTML tags, <script>, javascript:, or URL-encoded script payloads.
- Referrer headers from unexpected external domains pointing to the WordPress AJAX endpoint.
- Unexplained creation of new administrator accounts or theme/plugin file modifications following suspicious AJAX requests.
Detection Strategies
- Deploy a web application firewall rule inspecting the id query parameter for script tags, event handlers, and encoded JavaScript on requests targeting the vulnerable AJAX action.
- Enumerate WordPress sites in the environment and flag installations running Formula theme version 0.5.1 or earlier using asset inventory data.
- Review browser error reports and content security policy (CSP) violation logs for inline script blocks tied to the affected endpoint.
Monitoring Recommendations
- Alert on spikes in requests to admin-ajax.php with the ti_customizer_notify_dismiss_recommended_plugins action from non-administrative IP addresses.
- Monitor WordPress audit logs for privilege changes, user creation, and option updates occurring shortly after suspicious AJAX activity.
- Track outbound requests from administrator browser sessions to unknown domains that could indicate cookie or token exfiltration.
How to Mitigate CVE-2024-5638
Immediate Actions Required
- Upgrade the Formula theme to a version later than 0.5.1 that includes the fix from WordPress Changeset #230569.
- Audit administrator accounts and reset credentials if suspicious AJAX activity is observed in logs.
- Invalidate active WordPress sessions and rotate authentication cookies and secret keys defined in wp-config.php.
Patch Information
The vendor remediated the issue in the theme repository through WordPress Changeset #230569. The patch adds proper sanitization and escaping to the id parameter handling in formula-customizer-notify.php. Site operators should update through the WordPress Dashboard under Appearance > Themes or by replacing the theme directory with the patched release.
Workarounds
- Deactivate the Formula theme and switch to an unaffected theme until the patched version is installed.
- Add a web application firewall rule to block requests to admin-ajax.php where action=ti_customizer_notify_dismiss_recommended_plugins and the id parameter contains non-alphanumeric content.
- Enforce a strict Content Security Policy that disallows inline scripts to reduce the impact of reflected XSS payloads.
# Example ModSecurity rule to block script payloads in the vulnerable parameter
SecRule ARGS:action "@streq ti_customizer_notify_dismiss_recommended_plugins" \
"id:1005638,phase:2,chain,deny,status:403,log,msg:'CVE-2024-5638 Formula theme XSS attempt'"
SecRule ARGS:id "@rx (?i)(<script|javascript:|onerror=|onload=|%3Cscript)" "t:none,t:urlDecodeUni"
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

