# ThinkRank AI SEO <= 2.17.1 - Authenticated (Contributor+) Server-Side Request Forgery and API Key Exposure via 'base_url' Parameter

- **ID:** WPSEC-2026-1654
- **Plugin:** ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO (`thinkrank`), https://wordpress.org/plugins/thinkrank/
- **Affected versions:** from 2.8.0 before 2.18.0
- **Fixed in:** 2.18.0 (Update to 2.18.0 or later.)
- **Severity:** High 7.1 (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N)
- **Weakness:** CWE-918
- **Usage among sites WPSec scans:** plugin Medium, affected versions Medium (as of 2026-10-26)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/thinkrank
- **Fix released:** 2026-10-25
- **Published:** 2026-10-26
- **URL:** https://wpsec.com/vuln/WPSEC-2026-1654/

## Description

The ThinkRank AI SEO plugin for WordPress is vulnerable to Server-Side Request Forgery via the 'base_url' parameter of the /ai/test-connection and /ai/models REST routes in all versions up to, and including, 2.17.1. This is due to the routes accepting an arbitrary OpenAI-compatible endpoint URL from any user granted the delegable AI Tools (thinkrank_content_tools) capability, and attaching the site's saved OpenAI-compatible API key to the request whenever no key was supplied, whatever URL was given. This makes it possible for authenticated attackers with Contributor-level access and above who have been granted AI Tools access through the plugin's Role Manager to receive the site's saved API key in the Authorization header on a host they control, and to send requests from the server to loopback and private network addresses.

## References

- https://wpsec.com/vuln/WPSEC-2026-1654/
- https://plugins.svn.wordpress.org/thinkrank/tags/2.18.0/
- https://wordpress.org/plugins/thinkrank/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-1654/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
