Stored XSS Vulnerability in @apostrophecms/seo
An authenticated Stored XSS vulnerability in the @apostrophecms/seo package (CVE-2026-53608) allows editors to inject malicious JavaScript into script tags, enabling session theft and unauthorized code execution for all site visitors.
The @apostrophecms/seo package (versions <= 1.4.2) contains a high-severity stored Cross-Site Scripting (XSS) vulnerability, identified as CVE-2026-53608. The flaw exists because the module inserts Google Analytics (seoGoogleTrackingId) and Google Tag Manager (seoGoogleTagManager) IDs directly into <script> templates without any input validation or output escaping.
Because ApostropheCMS grants editor-level users the authority to modify the global site configuration, a compromised editor account or a malicious insider can inject arbitrary JavaScript payloads into these fields. The vulnerable data is then served verbatim to every visitor on every page of the website. This represents a significant risk for enterprises, as it facilitates full session hijacking of administrators, credential harvesting, and the potential for persistent site-wide malware delivery.
Attack Chain
- Attacker authenticates to the target application using valid editor-level credentials via the
/api/v1/@apostrophecms/login/loginendpoint. - Attacker performs an authorized GET request to
/api/v1/@apostrophecms/globalto retrieve the current global document ID. - Attacker identifies the
_idfield corresponding to the draft version of the global settings document. - Attacker uses a PATCH request to the
/api/v1/@apostrophecms/global/{GLOBAL_DRAFT_ID}endpoint to overwrite theseoGoogleTrackingIdfield with a malicious payload (e.g.,G-FAKE'); alert(document.cookie); //). - Attacker calls the
/api/v1/@apostrophecms/global/{GLOBAL_DRAFT_ID}/publishendpoint to promote the malicious draft to production. - The application renders the payload inside a
<script>tag within the page header. - Site visitors (including administrators) load the page, triggering the injected JavaScript in their browsers.
- Attacker captures exfiltrated session tokens or credentials via a remote listener.
Impact
Successful exploitation allows for complete compromise of site visitor sessions. Because the payload is stored globally, it executes on every page visit, providing an attacker with persistent access to the browser environment. This impacts the confidentiality and integrity of both the site visitors and the administrative user base, potentially leading to full administrative account takeover and unauthorized modification of site content.
Recommendation
Prioritized actions for security and engineering teams:
- Update the
@apostrophecms/seopackage to a version that implements input validation and safe template rendering. - Implement a strict Content Security Policy (CSP) that restricts script sources and forbids inline script execution to mitigate XSS impact.
- Review the permissions of the 'editor' role within ApostropheCMS to ensure that only trusted users have access to global configuration settings.
- Audit logs for PATCH/POST requests directed at the
/api/v1/@apostrophecms/globalendpoint to identify suspicious modifications to tracking IDs. - Apply the validation logic proposed in the CVE-2026-53608 advisory (e.g., regex-based tracking ID verification) to any custom modules handling similar site-wide configurations.
Detection coverage 1
Detect CVE-2026-53608 Exploitation - Malicious Script Injection in Global Config
highDetects exploitation of CVE-2026-53608 by monitoring PATCH requests to the global configuration API containing common XSS vectors in tracking ID fields.
Detection queries are available on the platform. Get full rules →