HIGH 8.7

CVE-2026-53608: ApostropheCMS SEO Module Stored XSS via Unsanitized Tracking IDs

ApostropheCMS, a popular open-source Node.js content management system, contains a stored cross-site scripting (XSS) vulnerability in its SEO configuration module. Editors and content managers can inject malicious code into Google Analytics and Google Tag Manager ID fields, which are then executed in the browsers of all website visitors. Because these fields accept unsanitized input and are rendered directly into page scripts without validation, an attacker with editor privileges can compromise every visitor's session and steal sensitive data.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.7 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Weaknesses (CWE)
CWE-79
Affected products
0 configuration(s)
Published / Modified
2026-06-12 / 2026-06-17

NVD description (verbatim)

ApostropheCMS is an open-source Node.js content management system. Versions up to and including 1.4.2 of the `@apostrophecms/seo` package injects the Google Analytics Tracking ID (`seoGoogleTrackingId`) and Google Tag Manager ID (`seoGoogleTagManager`) directly into `<script>` tag bodies using JavaScript template literals without any sanitization or validation. Any user with editor-level access (the default role for content managers) can set these fields to a malicious value, resulting in stored XSS that executes on every page for every visitor of the site. As of time of publication, no known patched versions are available.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The @apostrophecms/seo package up to version 1.4.2 directly embeds user-supplied Google Analytics Tracking ID and Google Tag Manager ID values into <script> tag bodies via JavaScript template literals. No input sanitization, encoding, or validation occurs before injection. An authenticated user with editor-level access can set `seoGoogleTrackingId` or `seoGoogleTagManager` to arbitrary JavaScript code. The injected payload executes in the browser context of every site visitor, creating a persistent XSS condition. The vulnerability maps to CWE-79 (Improper Neutralization of Input During Web Page Generation).

Business impact

Stored XSS on every page of the website affects all visitors, not just authenticated users. Attackers can harvest session tokens, redirect users to phishing sites, capture keystrokes, deface content, or inject cryptominers. The attack surface is especially wide because it exploits a trust boundary between content editors and end-users—a threat model many organizations underestimate. Recovery requires identifying when the malicious configuration was set, purging it, and potentially invalidating user sessions site-wide. Reputational damage and regulatory exposure (GDPR, CCPA) are material risks if user data is exfiltrated.

Affected systems

ApostropheCMS @apostrophecms/seo package versions up to and including 1.4.2 are vulnerable. The vulnerability requires editor-level access, which is the default role for content managers in ApostropheCMS deployments. Any instance running the affected version with active content editors is at risk.

Exploitability

Exploitability is moderately high. The attacker must possess editor-level credentials, but these are typically distributed to multiple staff members in content management workflows. No special technical skill is required—the attacker simply fills in a web form field with JavaScript code. Once injected, the payload executes automatically on every page load for every visitor, with no further user interaction required. The vulnerability became exploitable as soon as the affected version was deployed.

Remediation

No patched version is currently available as of publication. Organizations should immediately audit their ApostropheCMS instances to confirm whether the @apostrophecms/seo package is in use and at what version. If vulnerable, restrict editor role assignments to trusted personnel only, audit recent changes to Google Analytics and Google Tag Manager ID fields, and monitor for unauthorized modifications. Pending a vendor patch, consider temporarily disabling the SEO module or implementing Web Application Firewall (WAF) rules to block script injection patterns in these configuration fields. Establish change control procedures requiring approval before editing these security-sensitive fields.

Patch guidance

As of the publication date (June 17, 2026), no patched version has been released. Monitor the ApostropheCMS project repository and security advisories for patch availability. When a patch is released, apply it immediately given the severity and ease of exploitation. Verify the patch version against the official vendor advisory before deployment. Test thoroughly in a staging environment first, as SEO module changes can affect site functionality.

Detection guidance

Check deployed ApostropheCMS instances for @apostrophecms/seo version 1.4.2 or earlier. Review CMS audit logs for modifications to `seoGoogleTrackingId` and `seoGoogleTagManager` fields, especially by non-administrative accounts. Inspect the <script> tag content in page source code for unusual JavaScript patterns or external URLs that don't match legitimate Google Analytics or GTM code. Monitor browser DevTools console errors and network requests from site visitors for signs of XSS exploitation (unusual API calls, data exfiltration). Implement Content Security Policy (CSP) headers as a compensating control to restrict inline script execution.

Why prioritize this

HIGH priority due to CVSS 8.7, stored XSS impact on all site visitors, low barrier to exploitation (editor access is common), and absence of a patch. The vulnerability is particularly dangerous because it compromises user trust in the website itself and affects downstream data integrity (analytics, user accounts, transactions).

Risk score, explained

CVSS 3.1 score of 8.7 (HIGH) reflects: network-accessible attack vector (AV:N), low attack complexity (AC:L), requirement for low-privilege authenticated access (PR:L), need for user interaction—though only for the attacker to modify settings, not for payload execution (UI:R), changed scope due to impact on other users (S:C), high confidentiality and integrity impact (C:H/I:H), and no availability impact (A:N). The score appropriately captures that this is a high-severity issue affecting all site visitors, though not a critical remote unauthenticated vulnerability.

Frequently asked questions

Do we need to patch immediately if we don't have external editors?

If you restrict editor access to fully trusted internal staff and use strong access controls (MFA, IP allowlisting), the risk is lower but not eliminated. A compromised internal account, malicious insider, or supply chain attack on a contractor could still trigger the vulnerability. Patching remains the correct long-term solution, but risk acceptance is more defensible in closed-editor environments.

Can a WAF or CSP header fully mitigate this while we wait for a patch?

A strict Content Security Policy (CSP) with `script-src 'self'` and removal of `'unsafe-inline'` can prevent malicious scripts from executing, making it an effective compensating control. However, CSP may break legitimate functionality depending on how the SEO module loads tracking code. Test carefully. WAF rules blocking script-like strings in those fields offer defense-in-depth but are not foolproof. Neither replaces patching.

How do we know if we've already been compromised?

Inspect the raw HTML source of your site's pages for unexpected JavaScript in the <script> tags generated by the SEO module. Compare `seoGoogleTrackingId` and `seoGoogleTagManager` values in your CMS database or admin UI against what you intentionally set. Check browser developer tools for network requests to unexpected domains. Review web server and CDN logs for unusual traffic patterns or requests from your site to third-party domains. If you discover suspicious activity, assume compromise and rotate all user credentials and session tokens.

Is this vulnerability in the core ApostropheCMS project or just in the SEO package?

The vulnerability is specific to the @apostrophecms/seo package, not the core ApostropheCMS framework. If you do not have the SEO package installed or enabled, you are not affected. Check your package.json and node_modules to confirm presence of @apostrophecms/seo.

This analysis is provided for informational purposes and reflects the state of vulnerability information as of the publication date. No exploit code or weaponized proof-of-concept is provided. Organizations should verify all technical details, patch availability, and affected versions against official vendor advisories and their own environments. This document does not constitute legal or compliance advice. Consult your security team and vendor for deployment-specific guidance. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).