[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$foTmO2l8wWQC3tizojxwPLs5MN099UZVfg2cu_5pxXpY":3},{"id":4,"url_slug":5,"title":6,"description":7,"plugin_slug":8,"theme_slug":9,"affected_versions":10,"patched_in_version":9,"severity":11,"cvss_score":12,"cvss_vector":13,"vuln_type":14,"published_date":15,"updated_date":16,"references":17,"days_to_patch":9,"patch_diff_files":19,"patch_trac_url":9,"research_status":20,"research_verified":21,"research_rounds_completed":22,"research_plan":23,"research_summary":24,"research_vulnerable_code":25,"research_fix_diff":26,"research_exploit_outline":27,"research_model_used":28,"research_started_at":29,"research_completed_at":30,"research_error":9,"poc_status":9,"poc_video_id":9,"poc_summary":9,"poc_steps":9,"poc_tested_at":9,"poc_wp_version":9,"poc_php_version":9,"poc_playwright_script":9,"poc_exploit_code":9,"poc_has_trace":21,"poc_model_used":9,"poc_verification_depth":9,"poc_exploit_code_gated":21,"source_links":31},"CVE-2025-13374","kalrav-ai-agent-unauthenticated-arbitrary-file-upload-via-kalravuploadfile-ajax-action","Kalrav AI Agent \u003C= 2.3.3 - Unauthenticated Arbitrary File Upload via kalrav_upload_file AJAX Action","The Kalrav AI Agent plugin for WordPress is vulnerable to arbitrary file uploads due to missing file type validation in the kalrav_upload_file AJAX action in all versions up to, and including, 2.3.3. This makes it possible for unauthenticated attackers to upload arbitrary files on the affected site's server which may make remote code execution possible.","kalrav-ai-agent",null,"\u003C=2.3.3","critical",9.8,"CVSS:3.1\u002FAV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H","Unrestricted Upload of File with Dangerous Type","2026-01-23 19:03:14","2026-05-04 15:53:54",[18],"https:\u002F\u002Fwww.wordfence.com\u002Fthreat-intel\u002Fvulnerabilities\u002Fid\u002F5dc8feae-fc89-4152-b9b2-2b70e6ccb30b?source=api-prod",[],"researched",false,3,"# Exploitation Research Plan - CVE-2025-13374\n\n## 1. Vulnerability Summary\nThe **Kalrav AI Agent** plugin (versions \u003C= 2.3.3) is vulnerable to an **Unauthenticated Arbitrary File Upload** vulnerability. The flaw exists in the `kalrav_upload_file` AJAX action, which fails to implement any file type validation or sufficient authentication\u002Fauthorization checks. This allows an unauthenticated attacker to upload malicious PHP files to the server, leading to Remote Code Execution (RCE).\n\n## 2. Attack Vector Analysis\n- **Endpoint:** `\u002Fwp-admin\u002Fadmin-ajax.php`\n- **AJAX Action:** `kalrav_upload_file`\n- **Hook:** `wp_ajax_nopriv_kalrav_upload_file` (unauthenticated) and `wp_ajax_kalrav_upload_file` (authenticated).\n- **Vulnerable Parameter:** `$_FILES` (specifically the file uploaded via the multipart request).\n- **Authentication:** None required (unauthenticated).\n- **Preconditions:** The plugin must be active. A nonce may be required if `check_ajax_referer` is present in the handler.\n\n## 3. Code Flow (Inferred from standard WordPress AJAX patterns)\n1. **Entry Point:** An unauthenticated user sends a `POST` request to `admin-ajax.php` with `action=kalrav_upload_file`.\n2. **Hook Execution:** WordPress triggers the function associated with `wp_ajax_nopriv_kalrav_upload_file`.\n3. **Handler Function:** The function (likely named `kalrav_upload_file`) starts processing.\n4. **Nonce Check (Potential):** The function might call `check_ajax_referer('kalrav_nonce', 'security')` or similar.\n5. **File Processing:** The function accesses `$_FILES['file']` (or a similar key).\n6. **Vulnerable Sink:** The function calls `move_uploaded_file()` or `wp_handle_upload()` without checking the file extension against a whitelist of safe types (like images) or explicitly forbidding `.php` files.\n7. **Storage:** The file is saved to the WordPress uploads directory, often within a subfolder like `\u002Fwp-content\u002Fuploads\u002Fkalrav-ai-agent\u002F`.\n\n## 4. Nonce Acquisition Strategy\nIf the `kalrav_upload_file` function enforces a nonce check, it must be retrieved from the frontend where the Kalrav AI Agent is rendered.\n\n1.  **Identify the Shortcode:** Search the plugin code for `add_shortcode`. It is likely `[kalrav_ai_agent]` or similar.\n2.  **Create a Trigger Page:**\n    ```bash\n    wp post create --post_type=page --post_status=publish --post_title=\"AI Agent\" --post_content='[kalrav_ai_agent]'\n    ```\n3.  **Identify JS Localization:** Search for `wp_localize_script` in the plugin source to find the object name and nonce key.\n    - **Likely Variable Name (Inferred):** `kalrav_ajax_obj` or `kalrav_vars`.\n    - **Likely Nonce Key (Inferred):** `nonce` or `security`.\n4.  **Extract Nonce via Browser:**\n    - Navigate to the newly created page using `browser_navigate`.\n    - Execute `browser_eval(\"window.kalrav_ajax_obj?.nonce\")` (replace with actual identifiers found in source).\n\n## 5. Exploitation Strategy\nThe exploit involves sending a multipart `POST` request to the AJAX endpoint containing a PHP shell.\n\n### Step 1: Preparation\n- Create a file named `shell.php`:\n  ```php\n  \u003C?php echo \"CVE-2025-13374_OK: \" . phpinfo(); ?>\n  ```\n\n### Step 2: Payload Delivery\nSend the request using the `http_request` tool:\n\n- **Method:** `POST`\n- **URL:** `http:\u002F\u002F\u003Ctarget>\u002Fwp-admin\u002Fadmin-ajax.php`\n- **Headers:** `Content-Type: multipart\u002Fform-data`\n- **Body Parameters:**\n    - `action`: `kalrav_upload_file`\n    - `security`: `[EXTRACTED_NONCE]` (if required)\n    - `file`: `shell.php` (The binary content of the shell)\n\n### Step 3: Identify Upload Path\nThe response from `admin-ajax.php` often returns the URL of the uploaded file in JSON format.\n- **Expected Response JSON:** `{\"success\": true, \"data\": {\"url\": \"http:\u002F\u002F...\u002Fwp-content\u002Fuploads\u002Fkalrav\u002Fshell.php\"}}`\n- **If no URL is returned:** Guess common paths like `\u002Fwp-content\u002Fuploads\u002Fkalrav-ai-agent\u002Fshell.php` or check the plugin's upload logic in the source.\n\n## 6. Test Data Setup\n1.  **Activate Plugin:** Ensure `kalrav-ai-agent` is installed and active.\n2.  **Shortcode Page:** Create a page containing the plugin's primary shortcode to ensure scripts and nonces are loaded.\n    - *Action:* `wp post create --post_type=page --post_status=publish --post_content='[kalrav_ai_agent]'` (Inferred shortcode).\n\n## 7. Expected Results\n- The server responds with `200 OK` and a JSON body indicating success.\n- The JSON contains a URL or path to the uploaded file.\n- Navigating to the uploaded `.php` file location executes the PHP code, displaying the `phpinfo()` output.\n\n## 8. Verification Steps\n1.  **Verify via HTTP:**\n    ```bash\n    # Use http_request to fetch the uploaded shell\n    # Check if response contains \"CVE-2025-13374_OK\"\n    ```\n2.  **Verify via WP-CLI:**\n    ```bash\n    # Check if the file exists in the filesystem\n    find \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fuploads\u002F -name \"shell.php\"\n    ```\n\n## 9. Alternative Approaches\n- **Filename Bypass:** If the plugin appends a random string, look for the exact filename in the JSON response.\n- **Path Traversal:** If the `filename` parameter is user-controllable, attempt to upload to the root directory or `wp-content\u002Fplugins\u002Fkalrav-ai-agent\u002F` using `..\u002F..\u002F` sequences.\n- **Mime-Type Spoofing:** If there is basic client-side validation, ensure the request includes `Content-Type: image\u002Fpng` for the file part while maintaining the `.php` extension.","The Kalrav AI Agent plugin for WordPress is vulnerable to unauthenticated arbitrary file uploads via the kalrav_upload_file AJAX action. Due to a lack of file type validation and authorization checks, an attacker can upload malicious PHP scripts to the server and achieve remote code execution.","\u002F* Inferred from vulnerability description and research plan *\u002F\n\nadd_action('wp_ajax_nopriv_kalrav_upload_file', 'kalrav_upload_file');\nadd_action('wp_ajax_kalrav_upload_file', 'kalrav_upload_file');\n\nfunction kalrav_upload_file() {\n    if (isset($_FILES['file'])) {\n        $uploaded_file = $_FILES['file'];\n        $upload_overrides = array('test_form' => false);\n        $movefile = wp_handle_upload($uploaded_file, $upload_overrides);\n        if ($movefile && !isset($movefile['error'])) {\n            echo json_encode(array('success' => true, 'url' => $movefile['url']));\n        }\n    }\n    wp_die();\n}","--- a\u002Fkalrav-ai-agent.php\n+++ b\u002Fkalrav-ai-agent.php\n@@ -10,6 +10,17 @@\n function kalrav_upload_file() {\n+    \u002F\u002F Check nonce for security\n+    check_ajax_referer('kalrav_nonce', 'security');\n+\n+    \u002F\u002F Ensure user has permissions or restrict unauthenticated usage\n+    if (!current_user_can('upload_files')) {\n+        wp_send_json_error('Unauthorized');\n+    }\n+\n     if (isset($_FILES['file'])) {\n-        $uploaded_file = $_FILES['file'];\n+        $file = $_FILES['file'];\n+        $allowed = array('jpg' => 'image\u002Fjpeg', 'png' => 'image\u002Fpng', 'gif' => 'image\u002Fgif');\n+        $file_type = wp_check_filetype($file['name'], $allowed);\n+\n+        if (!$file_type['ext']) {\n+            wp_send_json_error('Invalid file type.');\n+        }\n+\n         $upload_overrides = array('test_form' => false);\n-        $movefile = wp_handle_upload($uploaded_file, $upload_overrides);\n+        $movefile = wp_handle_upload($file, $upload_overrides);","The exploit targets the kalrav_upload_file AJAX action which is registered for unauthenticated users. An attacker first navigates to a public page containing the Kalrav AI Agent (e.g., via a shortcode) to extract a security nonce if required by the implementation. They then send a multipart\u002Fform-data POST request to \u002Fwp-admin\u002Fadmin-ajax.php with the 'action' parameter set to 'kalrav_upload_file', the 'security' parameter containing the nonce, and a 'file' parameter containing a malicious PHP script. If successful, the server responds with a JSON object containing the URL of the uploaded file. The attacker then visits this URL to execute the PHP code on the server.","gemini-3-flash-preview","2026-05-05 01:54:11","2026-05-05 01:54:26",{"type":32,"vulnerable_version":9,"fixed_version":9,"vulnerable_browse":9,"vulnerable_zip":9,"fixed_browse":9,"fixed_zip":9,"all_tags":33},"plugin","https:\u002F\u002Fplugins.trac.wordpress.org\u002Fbrowser\u002Fkalrav-ai-agent\u002Ftags"]