CVE-2023-6638
Executive Summary
CVE-2023-6638 is a Missing Authorization vulnerability in the GTG Product Feed for Shopping WordPress plugin (versions up to and including 1.2.4). The plugin fails to perform a capability check on the update_settings function, allowing unauthenticated attackers to modify plugin settings. This can lead to unauthorized changes to the plugin’s configuration, potentially redirecting product feeds, injecting malicious data, or disrupting e-commerce operations. The vulnerability has a CVSS score of 6.5 (Medium) and a low EPSS score (0.0%), but due to the lack of a patch, it remains a risk for unmaintained sites.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Since the plugin is part of the WordPress ecosystem, site administrators must manually update or remove the plugin if a patch is not provided. No supply chain compromise has been reported, but the unpatched status increases the risk of exploitation in the wild.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. The vulnerability allows unauthenticated modification of plugin settings, which can be used to alter product feed URLs, inject malicious content, or disrupt e-commerce functionality. While not directly leading to data theft, it can be leveraged for further attacks (e.g., phishing, SEO spam).
Deep Dive & Mechanics
The vulnerability resides in the update_settings function of the GTG Product Feed for Shopping plugin. This function is intended to be called by authenticated administrators to update plugin settings. However, due to a missing capability check (e.g., current_user_can('manage_options')), the function is accessible to any unauthenticated user via a direct AJAX or REST API call.
Root Cause: The plugin registers the update_settings action without verifying user permissions. The code likely uses add_action('wp_ajax_nopriv_update_settings', ...) or similar, allowing unauthenticated access.
Impact: An attacker can:
- Change the product feed URL to a malicious domain.
- Modify feed generation intervals or filters.
- Disable the plugin’s output.
- Inject arbitrary data into the feed (e.g., spam links).
Vulnerable vs. Patched Code
Vulnerable Code (<= 1.2.4):
add_action('wp_ajax_nopriv_update_settings', 'gtg_update_settings');
function gtg_update_settings() {
// No capability check
update_option('gtg_feed_url', $_POST['feed_url']);
// ... other settings
}
Patched Code (Hypothetical):
add_action('wp_ajax_update_settings', 'gtg_update_settings');
function gtg_update_settings() {
if (!current_user_can('manage_options')) {
wp_die('Unauthorized');
}
update_option('gtg_feed_url', sanitize_url($_POST['feed_url']));
// ... other settings
}
Key Differences:
- The patched version uses
wp_ajax_(authenticated) instead ofwp_ajax_nopriv_(unauthenticated). - A capability check (
current_user_can('manage_options')) is added. - Input sanitization is applied.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with GTG Product Feed for Shopping plugin <= 1.2.4 installed and activated.
- Network access to the site.
Exploitation Steps:
- Identify the vulnerable endpoint (e.g.,
/wp-admin/admin-ajax.php). - Craft a POST request with the action
update_settingsand desired parameters. - Send the request to modify plugin settings.
Example cURL Command:
curl -X POST http://target.com/wp-admin/admin-ajax.php \
-d "action=update_settings&feed_url=http://malicious.com/feed"
Expected Outcome: The plugin’s feed URL is changed to the attacker-controlled URL.
Blue Team (Detection & Hardening)
Detection:
- Monitor for POST requests to
/wp-admin/admin-ajax.phpwithaction=update_settingsfrom unauthenticated sources. - Check for unexpected changes in plugin settings (e.g., feed URLs, generation intervals).
Hardening:
- Disable the plugin if not in use.
- Apply a virtual patch using a Web Application Firewall (WAF) to block unauthenticated requests to
update_settings. - Implement a custom plugin to add capability checks.
WAF Rule (ModSecurity):
SecRule REQUEST_FILENAME "/wp-admin/admin-ajax.php" \
"chain,id:1001,deny,msg:'GTG Product Feed - Unauthenticated Settings Update'"
SecRule ARGS:action "update_settings" \
"chain"
SecRule &ARGS:feed_url ">0"
Indicators of Compromise (IOCs)
Network IOCs:
- POST requests to
/wp-admin/admin-ajax.phpwithaction=update_settingsand no authentication cookie. - Outbound connections to unknown or suspicious domains from the WordPress server (if feed URL is changed).
- POST requests to
File IOCs:
- Modified plugin settings in the
wp_optionstable (e.g.,gtg_feed_url,gtg_feed_interval).
- Modified plugin settings in the
Log IOCs:
- WordPress debug logs showing
update_settingscalls without a valid user session.
- WordPress debug logs showing
Detection Engineering
YARA Rule
rule CVE_2023_6638_GTG_Product_Feed {
meta:
description = "Detects vulnerable GTG Product Feed for Shopping plugin files"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-6638"
strings:
$vuln_func = "wp_ajax_nopriv_update_settings"
$vuln_action = "add_action('wp_ajax_nopriv_update_settings'"
condition:
$vuln_func or $vuln_action
}
Sigma Rule
title: CVE-2023-6638 - Unauthenticated GTG Product Feed Settings Modification
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects unauthenticated POST requests to WordPress admin-ajax.php with the update_settings action.
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: POST
cs-uri-query|contains: "/wp-admin/admin-ajax.php"
cs-uri-query|contains: "action=update_settings"
condition: selection
falsepositives:
- Legitimate admin requests (if authenticated)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2023-6638 - GTG Product Feed Unauthenticated Settings Update"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=update_settings"; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if not essential for business operations.
- Apply a virtual patch using a WAF to block unauthenticated requests to
update_settings. - Monitor logs for exploitation attempts.
Long-Term Fix:
- The vendor (Gtg) must release a patched version that adds capability checks and input sanitization.
- If no patch is forthcoming, consider replacing the plugin with an alternative.
Workaround:
- Add a custom plugin or mu-plugin that hooks into
wp_ajax_nopriv_update_settingsand denies access:
add_action('wp_ajax_nopriv_update_settings', function() {
wp_die('Unauthorized', 403);
}, 1);
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.