Summary
Ghost CMS contained an incomplete Cross-Site Request Forgery (CSRF) protection around the /session/verify endpoint, allowing one-time codes (OTCs) to be reused or applied in login sessions different from the original requesting session.
In practical phishing scenarios, this could make it easier for attackers to complete or hijack login flows and take over Ghost sites when victims are tricked into interacting with attacker-controlled pages.
Affected context
This vulnerability affects Ghost CMS instances running versions 5.101.6 through 6.19.2 that:
- Expose the web-based login flow using OTCs (one-time codes) for session verification
- Rely on the
/session/verifyendpoint as part of authentication or session confirmation - Operate in environments where users may be lured onto attacker-controlled websites (e.g., via phishing emails or links)
The issue manifests when the CSRF protections for /session/verify do not tightly bind the OTC usage to the originating browser session and request context.
Exploit preconditions
- Attack surface: Publicly accessible Ghost admin or login interface over HTTP(S), including the
/session/verifyendpoint. - Required access: No prior authenticated access is strictly required, but the attacker must be able to interact with a victim (social engineering / phishing) and induce the victim's browser to send crafted requests.
- Trigger point: The victim, while logged in or in the process of logging in, visits an attacker-controlled page that silently triggers or relays a
/session/verifyrequest containing an OTC or session-related data. - Why exploitation is possible: The CSRF protection around
/session/verifyis incomplete, allowing valid OTCs to be consumed within a different login session context than the one that requested them. This breaks the assumption that OTCs are tightly bound to a single, user-initiated authentication flow and enables cross-session request manipulation.
Why this happens
The underlying flaw is a classic CSRF design issue where a sensitive state-changing endpoint is not fully bound to the originating session and request context. While Ghost employs CSRF defenses, the /session/verify flow did not correctly couple one-time codes (OTCs) to:
- The browser session that initiated the login flow, and/or
- Adequate CSRF tokens or equivalent anti-forgery signals.
This aligns with CWE-352: Cross-Site Request Forgery (CSRF), where a web application performs critical actions based solely on existing authentication or validation tokens without verifying that the request originated from a legitimate, user-intended interaction. In this case, the system treated OTC validation as sufficient proof without enforcing a strict relationship to the initiating session, enabling attackers to replay or reuse OTCs across sessions in some flows.
Potential impact
- Attackers could potentially complete or hijack login sessions initiated by victims.
- Phishers may more easily obtain administrative access to a Ghost site through carefully orchestrated login flows.
- Compromise of site configuration, content, and user data accessible via the Ghost admin interface.
- Escalation to broader account takeover if the compromised account has elevated or owner-level privileges.
- Potential abuse of a compromised Ghost instance to host further phishing or malicious content.
General mitigation guidance
Effective mitigation focuses on strengthening request authenticity and strictly binding sensitive verification flows to the correct session context:
- Ensure all authentication-adjacent endpoints (including
/session/verify) enforce robust CSRF defenses (e.g., synchronizer tokens, double-submit cookies, or same-site cookie strategies) and validate them on every state-changing request. - Bind OTCs to a specific session or device context, such that a one-time code is only valid for the exact login flow and browser session that requested it, and automatically expires after a short time or single use.
- Treat login verification endpoints as high-risk and require multiple converging signals (e.g., CSRF token, same-site cookies, referer/origin validation where appropriate, and rate-limiting).
- Apply least-privilege principles to administrative accounts and reduce the window of exposure by enforcing session timeouts and re-authentication requirements for sensitive operations.
- Educate developers and operators to treat any OTP/OTC-based endpoint as equivalent to password entry and secure it accordingly.
How teams detect issues like this
To detect and prevent similar issues, organizations can:
- Use static analysis or linting rules to flag sensitive endpoints (login, session, verification, password reset) that lack CSRF token validation or equivalent protection checks.
- Incorporate security-focused code review checklists that explicitly cover:
- Presence and validation of CSRF tokens
- Session-binding of OTC/OTP-based flows
- Correct use of SameSite attributes on cookies involved in authentication
- Add automated tests or integration tests that attempt cross-origin or cross-session calls to authentication endpoints and verify they are rejected when CSRF protections or expected session bindings are absent.
- Employ application security testing tools (DAST/IAST) configured with scenarios that simulate phishing-style cross-origin requests to login and session verification endpoints.

