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-0379 Overview
CVE-2024-0379 is a Cross-Site Request Forgery (CSRF) vulnerability in the Custom Twitter Feeds plugin for WordPress, developed by Smashballoon. The flaw affects all versions up to and including 2.2.1. The vulnerability stems from missing or incorrect nonce validation in the ctf_auto_save_tokens function. Unauthenticated attackers can overwrite the site's Twitter/X API token and secret by tricking a site administrator into visiting a malicious link. The vulnerability is categorized under [CWE-352] Cross-Site Request Forgery.
Critical Impact
Successful exploitation allows attackers to replace legitimate Twitter/X API credentials, hijacking the social feed integration and potentially redirecting it to attacker-controlled content.
Affected Products
- Smashballoon Custom Twitter Feeds (A Tweets Widget or X Feed Widget) plugin for WordPress
- All versions up to and including 2.2.1
- WordPress installations with the plugin active and an authenticated administrator session
Discovery Timeline
- 2024-02-29 - CVE-2024-0379 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-0379
Vulnerability Analysis
The Custom Twitter Feeds plugin exposes the ctf_auto_save_tokens function to handle Twitter/X API token updates. The function lacks proper WordPress nonce verification, which is the standard mechanism used to confirm that a request originated from a legitimate authenticated session. Without this check, the endpoint cannot distinguish between a legitimate administrator action and a cross-origin request forged by an attacker.
An attacker crafts a malicious page containing a hidden form or JavaScript that submits a request to the vulnerable endpoint. If a logged-in administrator visits the attacker-controlled page, the browser automatically includes session cookies, and the request is processed as if the administrator initiated it. The plugin then stores the attacker-supplied API credentials.
Root Cause
The root cause is missing or incorrect nonce validation inside ctf_auto_save_tokens. WordPress provides check_admin_referer() and wp_verify_nonce() to protect state-changing actions, but these were not applied correctly to this handler. See the WordPress Plugin Code File and the Wordfence Vulnerability Report for technical specifics.
Attack Vector
Exploitation requires user interaction: the attacker must trick an authenticated WordPress administrator into clicking a link or loading a page that submits the forged request. The attack is network-based and does not require attacker authentication. Once the request executes, the Twitter/X API token and secret are replaced with values controlled by the attacker, breaking the legitimate feed and enabling display of attacker-selected content.
No verified exploit code available. See the Wordfence advisory and the WordPress plugin changeset referenced below for technical details.
Detection Methods for CVE-2024-0379
Indicators of Compromise
- Unexpected changes to the Twitter/X API token and secret stored in the plugin settings, particularly without a corresponding administrator action in audit logs.
- WordPress feeds suddenly displaying unrelated or unexpected content sourced from an attacker-controlled Twitter/X account.
- HTTP POST requests to admin-ajax.php or plugin endpoints with the ctf_auto_save_tokens action and a Referer header pointing to an external domain.
Detection Strategies
- Review web server logs for POST requests invoking the ctf_auto_save_tokens action with missing or external Referer headers.
- Compare current Twitter/X API credentials in the WordPress database against the known-good values recorded during the original integration.
- Audit the WordPress options table for recent modifications to Custom Twitter Feeds configuration entries.
Monitoring Recommendations
- Enable WordPress activity logging to capture administrator-initiated plugin configuration changes.
- Alert on outbound requests from WordPress servers to unexpected Twitter/X API endpoints or token exchange URLs.
- Monitor file integrity for the custom-twitter-feed.php file to detect tampering or downgrade attempts.
How to Mitigate CVE-2024-0379
Immediate Actions Required
- Update the Custom Twitter Feeds plugin to a version later than 2.2.1 that includes the nonce validation fix.
- Rotate the Twitter/X API token and secret used by the plugin, and verify the values match the legitimate administrator-configured credentials.
- Review WordPress administrator sessions and sign out any inactive accounts to limit CSRF exposure.
Patch Information
Smashballoon addressed the issue in a plugin update tracked in the WordPress Plugin Changeset. The fix adds nonce validation to the ctf_auto_save_tokens handler so unauthenticated cross-origin requests are rejected. Administrators should apply the latest version available via the WordPress plugin repository.
Workarounds
- Deactivate the Custom Twitter Feeds plugin until the patched version is installed.
- Deploy a Web Application Firewall (WAF) rule to block requests to the ctf_auto_save_tokens action that lack a same-origin Referer or valid nonce parameter.
- Instruct administrators to log out of WordPress sessions before browsing untrusted sites and to avoid clicking unverified links while authenticated.
# Example WAF rule concept (ModSecurity-style) to block cross-origin requests to the vulnerable action
SecRule REQUEST_URI "@contains admin-ajax.php" \
"chain,phase:2,deny,status:403,id:1002024379,msg:'CVE-2024-0379 CSRF attempt'"
SecRule ARGS:action "@streq ctf_auto_save_tokens" \
"chain"
SecRule REQUEST_HEADERS:Referer "!@beginsWith https://your-wordpress-site.example/"
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

