/

CVE-2026-35569

Severity:

HIGH RISK

(8.7)

Cross-Site Scripting (Stored XSS) in ApostropheCMS SEO

CVE-2026-35569

Modified

Vulnerability type

Category:

Cross-Site Scripting (Stored XSS)

CWE:

CWE-79, CWE-116

Impact:

Arbitrary JavaScript execution in users' browsers with the privileges of their authenticated session

Severity:

HIGH RISK

(8.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

ApostropheCMS versions 4.28.0 and prior contain a stored cross-site scripting (XSS) vulnerability in SEO-related fields such as SEO Title and Meta Description, where user-controlled values are rendered into HTML and JSON-LD without proper output encoding.

An attacker who can control these fields may inject malicious JavaScript that executes in the browser of authenticated users viewing the affected page, enabling unauthorized actions and data access via the application's authenticated APIs.

Affected context

The vulnerability exists in ApostropheCMS when SEO-related content fields (e.g., SEO Title, Meta Description, and structured data) are rendered into:

  • <title> tags
  • <meta> tag attributes
  • JSON-LD structured data embedded in pages

without context-appropriate output encoding.

It is relevant in deployments where non-admin or semi-trusted users can edit page SEO settings and where pages are viewed by authenticated users (e.g., administrators, editors) whose sessions grant access to internal APIs and sensitive data.

Exploit preconditions

  • Attack surface: Web UI and content editing interfaces of ApostropheCMS.
  • Required access: Ability to create or modify content that controls SEO fields (SEO Title, Meta Description, or related structured SEO data) for a page or piece of content.
  • Trigger point: A victim (typically an authenticated user such as an editor or administrator) visits or previews a page whose SEO fields contain the attacker's payload. The browser then renders:
  • <title> content
  • <meta> attributes
  • JSON-LD script blocks

without proper encoding.

  • Why exploitation is possible: User-supplied SEO values are inserted directly into HTML and JSON-LD contexts without escaping or encoding for those specific output contexts, allowing an attacker to break out of the intended attribute or data context (e.g., via "></title><script>...) and inject active JavaScript.

Why this happens

The root cause is improper output encoding of user-controlled data rendered into security-sensitive HTML and script-adjacent contexts, mapping primarily to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting).

ApostropheCMS allows SEO fields to be edited by users and then reuses those values directly in:

  • The <title> element of the page
  • <meta> tag attributes (such as content attributes)
  • JSON-LD structured data embedded via <script type="application/ld+json">

Without applying context-appropriate escaping (e.g., HTML-encoding, attribute-encoding, and JSON-encoding), the application treats these values as trusted markup. As a result, carefully crafted payloads can escape the intended context and inject script tags or event handlers, leading the browser to execute attacker-controlled JavaScript.

This is conceptually related to CWE-116: Improper Encoding or Escaping of Output, where data is not transformed appropriately for the output channel and context, allowing the data to be interpreted as code.

Potential impact

  • Execution of arbitrary JavaScript in the browser of authenticated users who view or edit affected pages.
  • Unauthorized use of the victim's authenticated session to call internal or administrative APIs (e.g., creating new users, changing roles, or modifying content).
  • Access to sensitive internal data, such as usernames, email addresses, and roles, via browser-accessible APIs.
  • Exfiltration of data and session-related information to attacker-controlled endpoints.
  • Persistent compromise of editorial or administrative accounts through injected script that re-triggers on subsequent page views.
  • Facilitation of further phishing, social engineering, or pivot attacks against users of the CMS.

General mitigation guidance

Effective mitigation focuses on rigorous, context-aware output encoding and tighter control around who can influence SEO fields:

  • Apply context-appropriate escaping to all SEO-related fields before rendering:
  • Use HTML-encoding when placing text in <title> elements.
  • Use attribute-encoding for values inside HTML attributes such as <meta content="...">.
  • Use robust JSON encoding for all data embedded in JSON-LD script blocks.
  • Centralize output encoding in well-reviewed helper functions or templating constructs, rather than duplicating manual string concatenation in templates.
  • Treat SEO fields as untrusted input regardless of the user role; do not bypass escaping based on perceived trust of the content editor.
  • Restrict who can edit SEO fields where possible, favoring least-privilege access for content contributors.
  • Consider applying additional validation and normalization on SEO field inputs (e.g., length limits, character whitelists where reasonable) to reduce the surface area for complex payloads, while recognizing that validation alone does not replace correct encoding.
  • Design templating and rendering layers to be "safe by default": templates should escape by default and require explicit opt-out (with strong justification and review) for raw HTML injection.

How teams detect issues like this

Detection can combine static analysis, code review, and runtime monitoring:

  • Static analysis and linting:
  • Use linters or static analysis tools that flag unescaped insertion of variables into templates, particularly in <title>, <meta>, <script type="application/ld+json">, and other high-risk contexts.
  • Define project-specific rules that require use of safe helper functions for rendering SEO fields.
  • Code review practices:
  • During review, explicitly trace any flow from user-editable fields (such as SEO fields in content types) to HTML output.
  • Check templates for direct interpolation of variables into tags and attributes without explicit escaping or encoding.
  • Require security review for any template regions that intentionally allow raw HTML.
  • Runtime and testing approaches:
  • Incorporate automated security tests that populate SEO fields with benign XSS test strings and verify that they render safely.
  • Use browser-based testing or dynamic scanners to crawl views that include SEO-related content and detect script execution or broken HTML structure.
  • Tooling integration:
  • Integrate automated template analyzers or SAST tools into CI pipelines so that new uses of unescaped output are flagged as part of build and merge processes.

Sources

SourceLink
github.comgithub.com/Chittu13/cve-research/tree/main/CVE-2026-35569
github.comgithub.com/apostrophecms/apostrophe/commit/0e57dd07a56ae1ba1e3af646ba026db4d0ab5bb3
github.comgithub.com/apostrophecms/apostrophe/security/advisories/GHSA-855c-r2vq-c292

Frequently asked

questions

Exploitability depends on who can modify SEO fields and who visits the affected pages. In many deployments, content editors or lower-privileged users can edit SEO metadata, while higher-privileged users such as administrators routinely view those pages, making it relatively practical for an attacker with content-editing access to target more privileged accounts.

The attacker generally needs the ability to create or modify content that controls the SEO Title, Meta Description, or related structured SEO data. This can come from a legitimate but low-privileged CMS account or a compromised contributor/editor account. They do not need direct server or database access—only control over the relevant content fields.

The safest fix is to apply strict, context-aware output encoding wherever user-supplied data is rendered. This means ensuring that SEO fields are HTML-encoded when placed in document titles, attribute-encoded within <meta> tags, and JSON-encoded inside JSON-LD blocks, using well-tested helper functions or template features that escape by default.

Preventing similar issues involves adopting secure templating practices (escape by default), enforcing security-focused code reviews for all template changes, and using automated tools to detect unescaped user input in HTML and script contexts. Additionally, treating all CMS-editable fields as untrusted, minimizing raw HTML insertion, and embedding security checks into CI/CD pipelines helps keep new XSS paths from being introduced.

Find out what's already
exploitable in your codebase.