The vulnerability, CVE-2026-105675, describes an 'Invite Token Disclosure in Ghost Admin API' where staff users could discover secret tokens of pending invites, leading to privilege escalation. The provided commit 4fb587e4d49667f929b87f7d6a873ae5e9cc087f directly addresses this issue by introducing robust validation for Admin API query parameters.
Analysis of the patch reveals that the ghost/core/core/server/api/endpoints/utils/api-filter-utils.ts file was significantly modified. Crucially, the ADMIN_API_RESTRICTED_FIELDS set was expanded to include sensitive fields like 'token', 'gift_link_token', and 'secret'. New functions, isAdminApiRestrictedOrderField, validateAdminApiRestrictedOrderFields, and restrictAdminApiQueryOptions, were introduced to enforce these restrictions on both filter and order parameters.
The ghost/core/core/server/api/endpoints/invites.js file, which handles invite-related API requests, was updated to utilize the new restrictAdminApiQueryOptions function. Specifically, the line return models.Invite.findPage(frame.options); was changed to return models.Invite.findPage(restrictAdminApiQueryOptions(frame.options));. This change indicates that, before the patch, the models.Invite.findPage function was directly processing potentially malicious frame.options without validating or rejecting queries that attempted to access or order by the sensitive token field. Therefore, when an attacker exploited this vulnerability, the models.Invite.findPage function would be executed with the crafted frame.options, leading to the disclosure of the invite token.
While other API endpoints also received similar updates to use restrictAdminApiQueryOptions for other restricted fields, the vulnerability description specifically highlights 'Invite Token Disclosure', making models.Invite.findPage the most direct and critical vulnerable function in the context of this CVE.