Webmention <= 5.6.2 - Authenticated (Subscriber+) Server-Side Request Forgery
Description
The Webmention plugin for WordPress is vulnerable to Server-Side Request Forgery in all versions up to, and including, 5.6.2 via the 'Tools::read' function. This makes it possible for authenticated attackers, with Subscriber-level access and above, to make web requests to arbitrary locations originating from the web application and can be used to query and modify information from internal services.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:NTechnical Details
What Changed in the Fix
Changes introduced in v5.7.0
Source Code
WordPress.org SVN# Exploitation Research Plan: CVE-2026-0688 (Webmention SSRF) ## 1. Vulnerability Summary The **Webmention** plugin for WordPress is vulnerable to an authenticated Server-Side Request Forgery (SSRF) via the `Tools::read` function. The vulnerability exists because the plugin registers a REST API end…
Show full research plan
Exploitation Research Plan: CVE-2026-0688 (Webmention SSRF)
1. Vulnerability Summary
The Webmention plugin for WordPress is vulnerable to an authenticated Server-Side Request Forgery (SSRF) via the Tools::read function. The vulnerability exists because the plugin registers a REST API endpoint that accepts a user-provided source URL and fetches it without sufficient validation or restriction to external addresses. This allows a user with at least Subscriber permissions (the read capability) to cause the server to make requests to internal services or arbitrary external locations.
2. Attack Vector Analysis
- REST API Endpoint:
wp-json/webmention/1.0/parse - HTTP Method:
GET(as defined byWP_REST_Server::READABLEinTools::register_routes) - Vulnerable Parameter:
source - Required Parameter:
target(must be a valid URL, but is not the primary SSRF target) - Authentication: Required (Subscriber-level access).
- Capability Check:
current_user_can( 'read' )in thepermission_callback. - Encryption/Nonce: Requires a standard WordPress REST API nonce (
_wpnonce) for authenticated requests.
3. Code Flow
- Route Registration: In
includes/class-tools.php, theTools::register_routesfunction registers the/parseroute. It sets thepermission_callbacktocurrent_user_can( 'read' ), which is granted to all logged-in users, including Subscribers. - Request Handling: When a GET request is made to
/wp-json/webmention/1.0/parse, theTools::readfunction is executed. - Parameter Extraction:
Tools::readextracts thesourceandtargetparameters from the$requestobject. - The Sink: The code calls
Request::get( $source, false ).- Based on the plugin architecture,
Webmention\Request::getperforms a remote HTTP request (likely usingwp_remote_get) to the provided$sourceURL.
- Based on the plugin architecture,
- Processing (Post-Request): The response is then passed to a
Handlerwhich attempts to parse it (e.g., using Microformats or the WordPress API handler). Even if parsing fails, the initial request to the internal/arbitrary IP has already been made.
4. Nonce Acquisition Strategy
The REST API requires a wp_rest nonce for authenticated sessions.
- Setup: Create a Subscriber user and log in.
- Page Navigation: Navigate to any standard WordPress page (like the Dashboard or Homepage).
- Extraction: Use
browser_evalto extract the REST nonce from thewpApiSettingsobject, which is standard in WordPress for localized REST data.- JS Expression:
window.wpApiSettings?.nonce
- JS Expression:
- Alternative: If
wpApiSettingsis not available, the agent can check the page source for_wpnoncein scripts or theX-WP-Nonceheader in link tags.
5. Exploitation Strategy
The goal is to demonstrate that the server can be forced to reach an internal resource (e.g., http://127.0.0.1 or a metadata service).
Step-by-Step Plan:
- User Creation: Create a user with the
subscriberrole using WP-CLI. - Authentication: Log in as the Subscriber.
- Nonce Retrieval: Navigate to
/wp-admin/and executebrowser_eval("window.wpApiSettings.nonce")to get the REST nonce. - Request Injection:
- Target:
http://localhost:8080/wp-json/webmention/1.0/parse - Method:
GET - Query Parameters:
source:http://127.0.0.1:80(or another internal IP/port)target:https://example.com(required for validation but secondary)_wpnonce:[EXTRACTED_NONCE]
- Target:
- Request Execution: Use the
http_requesttool to perform the GET request.
Expected Payload (HTTP Request):
GET /wp-json/webmention/1.0/parse?source=http://127.0.0.1:80&target=https://example.com&_wpnonce=a1b2c3d4e5 HTTP/1.1
Host: localhost:8080
Cookie: [SUBSCRIBER_COOKIES]
6. Test Data Setup
- Target Internal Content: Ensure there is something to "hit" internally. The easiest target is the WordPress instance itself on
127.0.0.1:80. - User:
wp user create attacker attacker@example.com --role=subscriber --user_pass=password123 - Plugin State: Ensure the Webmention plugin is active.
wp plugin activate webmention
7. Expected Results
- Success Condition: The server attempts to fetch the
sourceURL. If targeting a running service (like the local WP instance), the REST API might return a structured response from the parsing handler (e.g., inMF2orWPmode). - JSON Response: A successful (though perhaps empty) JSON object containing parsed fields.
- Error Response: If the internal service returns something non-HTML, the
Handlermight return aWP_Errorwithno_api_link(fromclass-wp.php), but theRequest::getcall will have already completed the SSRF.
8. Verification Steps
- Log Observation: If possible, check the access logs of the service at the
sourceIP to see a request originating from the WordPress server's IP. - Response Analysis:
- If
sourceis an internal WordPress site, look for responses that include details from that site's REST API, indicating theWPhandler (includes/handler/class-wp.php) successfully navigated from the initial URL to the site's API root.
- If
- Blind Verification: If no output is returned, use an OOB (Out-Of-Band) interaction service (like Webhook.site) as the
sourceand verify the hit.
9. Alternative Approaches
- Aggregated Mode: Set
mode=aggregatedin the query string to trigger theparse_aggregatedpath inTools::read. - Targeting Metadata: On cloud environments, target
http://169.254.169.254/latest/meta-data/to demonstrate high-impact data exposure. - Protocol Smuggling: Attempt
gopher://orfile://if the underlyingRequest::getwrapper doesn't strictly enforcehttp(s). (Thoughesc_url_rawusually limits this).
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.