CVE-2026-113659: ApostropheCMS Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-m2m5-rw3w-cwmj
CVSS 6.1
CWE-1321 CWE-79
Published
Advisory Summary

CVE-2026-113659 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting ApostropheCMS libraries in the npm ecosystem. The issue involves client-side prototype pollution in apos.http.parsequery leading to dom-based xss against authenticated users. Remediation is available by upgrading affected packages to version 4.33.0.

CVE-2026-113659 at a Glance

CVE Identifier CVE-2026-113659
GHSA Identifier GHSA-m2m5-rw3w-cwmj
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product ApostropheCMS
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-113659

To remediate this vulnerability, upgrade all affected ApostropheCMS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

apostrophe fixed: 4.33.0
npm install apostrophe@4.33.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls apostrophe

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-113659, inspect your project dependencies using npm:

npm ls apostrophe

Analyze the terminal output to locate any version of ApostropheCMS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.33.0), your application is affected.

Note: The npm ls apostrophe command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In ApostropheCMS, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The client-side helper `apos.http.parseQuery()` in ApostropheCMS builds a nested object from a URL query string without sanitizing the keys `__proto__`, `constructor`, or `prototype`. Parsing an attacker-controlled query string therefore writes arbitrary properties onto `Object.prototype` (client-side prototype pollution). ApostropheCMS's admin UI calls this parser with `window.location.search` on **every authenticated page load** (the admin context bar's `data()` initializer). Because the admin UI is built on Vue, a polluted, enumerable property on `Object.prototype` is then picked up by Vue's standard element-mount routine and written to the DOM as an element property, turning the prototype pollution into DOM-based XSS in the victim's authenticated session. The escalation gadget is a well-known, general Vue behavior; the novel, reportable defect is the unsanitized `parseQuery` source together with the authenticated trigger, both of which are ApostropheCMS code. Any user who can get **any logged-in user (from the lowest-privileged `guest` role up to the highest-privileged `admin` role)** to open a crafted URL can execute arbitrary JavaScript in that user's session. This is **distinct from CVE-2026-53609** (server-side prototype pollution via `apos.util.set()` / `$pullAll`, fixed in 4.31.0): different side (client vs server), different code path, and the vulnerable code here is present in the current release. ## Package - **Ecosystem:** npm - **Package:** `apostrophe` - **Affected versions:** all **4.x** releases, **4.0.0 through 4.32.2** (current `latest`). Verified by inspecting the published npm tarballs: `apostrophe@4.0.0` already contains the vulnerable descent (`parentKey = 'root'`) with no `__proto__`/`constructor`/`prototype` filtering, and `apostrophe@4.32.2` is unchanged in this respect. The vulnerable `parseQuery()` logic was introduced in commit `0255086bf` (2020-11-12), well before the 4.0 version, so **ApostropheCMS 3.x is also affected** (the same code ships in 3.x at the older build path `modules/@apostrophecms/util/ui/public/2-http.js`). - **Patched versions:** none at time of writing. ## Details The issue has three parts. Parts 1 and 2 are ApostropheCMS code and constitute the reportable vulnerability. Part 3 is the escalation gadget, which is standard Vue behavior and is included for completeness. ### 1. The pollution primitive: source (ApostropheCMS) `modules/@apostrophecms/util/ui/src/http.js`, function `apos.http.parseQuery()` (line ~301) and its inner `patch()` (lines ~317–354): ```js function patch(key, value) { let match; let parentKey = 'root'; let context = data; // data = {} (ordinary object) key = decodeURIComponent(key); const path = key.split('['); path.forEach(function(subKey) { if (subKey === ']') { /* array handling */ } else if (subKey.match(/^\d+]/)) { /* numeric index handling */ } else { match = subKey.replace(']', ''); if (!context[parentKey]) { // (A) truthy check, not an own-property check context[parentKey] = {}; } context = context[parentKey]; // (B) descends into whatever this resolves to parentKey = match; } }); value = (value === null) ? value : decodeURIComponent(value); if (Array.isArray(context[parentKey])) { context[parentKey].push(value); } else if (context[parentKey] !== undefined) { context[parentKey] = [ context[parentKey], value ]; } else { context[parentKey] = value; // (C) assignment onto the resolved object } } ``` No `__proto__`, `constructor`, or `prototype` key is rejected. Walking the input `__proto__[x]=v`: 1. Segment `__proto__`: at **(A)**, `context['__proto__']` resolves to the object's inherited prototype (truthy), so the `{}` initializer is skipped; at **(B)**, `context` becomes `Object.prototype`. 2. Segment `x`: at **(C)**, `Object.prototype['x'] = v`. The truthy guard at **(A)** (rather than an own-property check) is what allows the descent into the inherited prototype. Because the assignment at **(C)** is an ordinary property write, the resulting `Object.prototype` property is **enumerable**,which matters for the gadget (3). ### 2. The trigger: reached on every authenticated page load (ApostropheCMS) `modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextBar.vue`. The component's `data()` initializer (line ~64) runs when the admin context bar mounts (i.e. on every authenticated page load), and passes the raw query string straight into the vulnerable parser: ```js data() { const query = apos.http.parseQuery(location.search); // <- attacker-controlled -> (1) pollution, on mount const draftMode = query.aposMode || 'published'; // ... } ``` The same component's `refresh()` method (line ~606) passes `window.location.search` into `parseQuery()` again on admin-bar refresh events, and folds it into `doc._url` (re-parsed inside `apos.http.remote()`), providing additional trigger points. The admin context bar mounts only when a session is present and the admin bundle loads, so none of this executes for anonymous visitors, which is why the pollution is observed **only when logged in**. All of this is core ApostropheCMS code (`node_modules/apostrophe/...`); it is not introduced by any project or starter kit content. ### 3. The escalation gadget: Vue element mount (framework behavior; known, not novel) The demonstrated payload pollutes the property `innerHTML` (`__proto__[innerHTML]=<img/src/onerror=alert(1)>`). The sink that consumes it is **Vue's standard element-mount path**, not ApostropheCMS code. Confirmed in the bundled framework (`vue` / `@vue/runtime-core` / `@vue/runtime-dom` all **3.5.42**): `@vue/runtime-core` `mountElement`, prop enumeration (line ~5741): ```js if (props) { for (const key in props) { // for...in walks the prototype chain if (key !== "value" && !shared.isReservedProp(key)) { // isReservedProp does NOT list innerHTML hostPatchProp(el, key, null, props[key], ...); // props["innerHTML"] → inherited polluted value } } ``` `@vue/runtime-dom` `patchDOMProp` (line ~583), reached via `hostPatchProp`: ```js function patchDOMProp(el, key, value, ...) { if (key === "innerHTML" || key === "textContent") { if (value != null) { el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; // el.innerHTML = payload } return; } ``` Mechanism: whenever Vue mounts an element that has a non-null `props` object without its own `innerHTML` (routine during the admin render), `for (const key in props)` enumerates the inherited, enumerable `innerHTML` from `Object.prototype`; it passes the `"value"` and `isReservedProp` filters; `props["innerHTML"]` resolves to the attacker's payload; and `patchDOMProp` writes it to `el.innerHTML`. `unsafeToTrustedHTML` is Vue's Trusted-Types wrapper, not a sanitizer, a passthrough unless Trusted Types is enforced (not the default). This gadget is a well-documented, essentially universal client-side-PP > XSS escalation in Vue applications. It is **not claimed as a novel finding** and is **not ApostropheCMS's to fix**, it cannot be removed without changing Vue. Its relevance here is that it makes the (1) pollution reliably exploitable in any ApostropheCMS admin session. ## Proof of Concept Prerequisite: a running ApostropheCMS instance and any authenticated session (a `guest` account suffices). The tester/victim must be logged in. **A. Prototype pollution (console-verifiable):** 1. Log in as any user. 2. Navigate to: `https://TARGET/?__proto__[prop]=polluted` 3. In the browser console: `Object.prototype.prop` > returns `"polluted"`. **B. DOM-based XSS:** 1. Log in as any user. 2. Navigate to: `https://TARGET/?__proto__[innerHTML]=%3Cimg/src/onerror%3dalert(1)%3E` 3. `alert(1)` executes in the victim's authenticated origin. To capture the sink stack for evidence: DevTools > Sources > open the admin bundle > pretty-print > search `unsafeToTrustedHTML` (or `=== "innerHTML"`) > line breakpoint in the `patchDOMProp` innerHTML branch > reload the logged-in payload URL > inspect `value` and walk the call stack up through `hostPatchProp` to `mountElement`'s `for…in`. Both A and B were reproduced against ApostropheCMS 4.32.2 (Vue 3.5.42) in Chrome, Firefox, and Edge browsers. ## Impact Any party who can coerce an authenticated ApostropheCMS user to open a crafted URL can execute arbitrary JavaScript in that user's session. Because the escalation gadget is a guaranteed-present Vue behavior, this is a reliable exploit, not a theoretical primitive. Consequences scale with the victim's role: - **Any authenticated victim:** actions and data reads available to that account; theft of the session cookie / CSRF token from the authenticated context. - **Editor/admin victim:** the injected script can invoke the authenticated management REST APIs as the victim, creating or modifying documents and user accounts, changing configuration and possibly leading to account takeover and potential full compromise of the CMS instance. Prototype pollution can additionally affect unrelated code paths that read inherited properties, so other gadgets beyond the demonstrated Vue `innerHTML` sink may exist. ## Remediation The fix belongs in ApostropheCMS, at the source (1). The gadget (3) is framework behavior and cannot be relied upon to change, so sanitizing `parseQuery` is the correct fix. **Primary fix: reject prototype-affecting keys in `parseQuery`/`patch()`**: ```js apos.http.parseQuery = function(query) { query = query.replace(/^\?/, ''); const data = {}; const DANGEROUS = new Set([ '__proto__', 'constructor', 'prototype' ]); query.split('&').forEach(function(pair) { // ... unchanged ... }); return data.root || {}; function patch(key, value) { let match; let parentKey = 'root'; let context = data; key = decodeURIComponent(key); const path = key.split('['); let dangerous = false; path.forEach(function(subKey) { const cleanKey = subKey.replace(']', ''); if (DANGEROUS.has(cleanKey)) { // refuse to traverse into prototype-affecting keys dangerous = true; return; } // ... existing subKey handling ... }); if (dangerous) { return; // discard this parameter entirely } // ... existing assignment ... } }; ``` **Defense in depth:** - Replace the truthy guard at **(A)** with an own-property check: `if (!Object.prototype.hasOwnProperty.call(context, parentKey))`, so a key can never descend into an inherited prototype. - Build `data` and any created containers with `Object.create(null)` so intermediate objects have no prototype chain to reach. **Interim mitigation for operators:** restrict who holds authenticated accounts, and be aware that opening untrusted links while logged in can trigger this. There is no server-side configuration toggle that disables the vulnerable client behavior. ## References - Source (ApostropheCMS): `apostrophe/modules/@apostrophecms/util/ui/src/http.js` — `parseQuery()` / `patch()` - Trigger (ApostropheCMS): `apostrophe/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextBar.vue` — `data()` (~line 64), `refresh()` (~line 606) - Escalation gadget (Vue 3.5.42, framework behavior): `@vue/runtime-core` `mountElement` prop enumeration (~line 5741); `@vue/runtime-dom` `patchDOMProp` innerHTML branch (~line 583) - Related but distinct: CVE-2026-53609 / GHSA-6h5j-32cf-4253 (server-side prototype pollution via `apos.util.set()` / `$pullAll`, fixed in 4.31.0) - CWE-1321; CWE-79 ## Credit ### Github Account Username: `Xx-LoGiCaL-xX` ---

CVE-2026-113659 Affected ApostropheCMS Versions

1 component(s)
Fixed Versions:
4.33.0
Product / Package Ecosystem Affected Versions Fixed Version
apostrophe
npm
< 4.33.0
4.33.0

References

Frequently Asked Questions

What is CVE-2026-113659?
CVE-2026-113659 is a security vulnerability in ApostropheCMS involving Client-side Prototype Pollution in apos.http.parseQuery leading to DOM-based XSS against authenticated users under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which ApostropheCMS versions are affected?
Affected versions include releases prior to 4.33.0 across affected packages: apostrophe.
What version fixes CVE-2026-113659?
Upgrading to 4.33.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is apostrophe affected?
Yes, apostrophe is affected in releases prior to 4.33.0. Upgrade your dependency to 4.33.0 or later.
What is the CVSS score of CVE-2026-113659?
CVE-2026-113659 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-113659?
CVE-2026-113659 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2026-113659?
Run the dependency tree command: 'npm ls apostrophe'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m2m5-rw3w-cwmj",
  "modified" : "2026-10-20T18:18:49Z",
  "published" : "2026-10-20T18:18:49Z",
  "aliases" : [ "CVE-2026-113659" ],
  "summary" : "ApostropheCMS: Client-side Prototype Pollution in apos.http.parseQuery leading to DOM-based XSS against authenticated users",
  "details" : "## Summary\n\nThe client-side helper `apos.http.parseQuery()` in ApostropheCMS builds a nested object\nfrom a URL query string without sanitizing the keys `__proto__`, `constructor`, or\n`prototype`. Parsing an attacker-controlled query string therefore writes arbitrary\nproperties onto `Object.prototype` (client-side prototype pollution).\n\nApostropheCMS's admin UI calls this parser with `window.location.search` on **every\nauthenticated page load** (the admin context bar's `data()` initializer). Because the admin\nUI is built on Vue, a polluted, enumerable property on `Object.prototype` is then picked up\nby Vue's standard element-mount routine and written to the DOM as an element property,\nturning the prototype pollution into DOM-based XSS in the victim's authenticated session.\nThe escalation gadget is a well-known, general Vue behavior; the novel,\nreportable defect is the unsanitized `parseQuery` source together with the authenticated\ntrigger, both of which are ApostropheCMS code.\n\nAny user who can get **any logged-in user (from the lowest-privileged `guest` role up to the highest-privileged `admin` role)** to\nopen a crafted URL can execute arbitrary JavaScript in that user's session.\n\nThis is **distinct from CVE-2026-53609** (server-side prototype pollution via\n`apos.util.set()` / `$pullAll`, fixed in 4.31.0): different side (client vs server),\ndifferent code path, and the vulnerable code here is present in the current release.\n\n## Package\n\n- **Ecosystem:** npm\n- **Package:** `apostrophe`\n- **Affected versions:** all **4.x** releases, **4.0.0 through 4.32.2** (current `latest`).\n  Verified by inspecting the published npm tarballs: `apostrophe@4.0.0` already contains the\n  vulnerable descent (`parentKey = 'root'`) with no `__proto__`/`constructor`/`prototype`\n  filtering, and `apostrophe@4.32.2` is unchanged in this respect. The vulnerable\n  `parseQuery()` logic was introduced in commit `0255086bf` (2020-11-12), well before the 4.0\n  version, so **ApostropheCMS 3.x is also affected** (the same code ships in 3.x at the older\n  build path `modules/@apostrophecms/util/ui/public/2-http.js`).\n- **Patched versions:** none at time of writing.\n\n## Details\n\nThe issue has three parts. Parts 1 and 2 are ApostropheCMS code and constitute the\nreportable vulnerability. Part 3 is the escalation gadget, which is standard Vue behavior\nand is included for completeness.\n\n### 1. The pollution primitive: source (ApostropheCMS)\n\n`modules/@apostrophecms/util/ui/src/http.js`, function `apos.http.parseQuery()`\n(line ~301) and its inner `patch()` (lines ~317–354):\n\n```js\nfunction patch(key, value) {\n  let match;\n  let parentKey = 'root';\n  let context = data;                    // data = {}  (ordinary object)\n  key = decodeURIComponent(key);\n  const path = key.split('[');\n  path.forEach(function(subKey) {\n    if (subKey === ']') {\n      /* array handling */\n    } else if (subKey.match(/^\\d+]/)) {\n      /* numeric index handling */\n    } else {\n      match = subKey.replace(']', '');\n      if (!context[parentKey]) {         // (A) truthy check, not an own-property check\n        context[parentKey] = {};\n      }\n      context = context[parentKey];      // (B) descends into whatever this resolves to\n      parentKey = match;\n    }\n  });\n  value = (value === null) ? value : decodeURIComponent(value);\n  if (Array.isArray(context[parentKey])) {\n    context[parentKey].push(value);\n  } else if (context[parentKey] !== undefined) {\n    context[parentKey] = [ context[parentKey], value ];\n  } else {\n    context[parentKey] = value;          // (C) assignment onto the resolved object\n  }\n}\n```\n\nNo `__proto__`, `constructor`, or `prototype` key is rejected. Walking the input\n`__proto__[x]=v`:\n\n1. Segment `__proto__`: at **(A)**, `context['__proto__']` resolves to the object's\n   inherited prototype (truthy), so the `{}` initializer is skipped; at **(B)**, `context`\n   becomes `Object.prototype`.\n2. Segment `x`: at **(C)**, `Object.prototype['x'] = v`.\n\nThe truthy guard at **(A)** (rather than an own-property check) is what allows the descent\ninto the inherited prototype. Because the assignment at **(C)** is an ordinary property\nwrite, the resulting `Object.prototype` property is **enumerable**,which matters for the\ngadget (3).\n\n### 2. The trigger: reached on every authenticated page load (ApostropheCMS)\n\n`modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextBar.vue`. The component's\n`data()` initializer (line ~64) runs when the admin context bar mounts (i.e. on every\nauthenticated page load), and passes the raw query string straight into the vulnerable\nparser:\n\n```js\ndata() {\n  const query = apos.http.parseQuery(location.search);   // <- attacker-controlled -> (1) pollution, on mount\n  const draftMode = query.aposMode || 'published';\n  // ...\n}\n```\n\nThe same component's `refresh()` method (line ~606) passes `window.location.search` into\n`parseQuery()` again on admin-bar refresh events, and folds it into `doc._url`\n(re-parsed inside `apos.http.remote()`), providing additional trigger points.\n\nThe admin context bar mounts only when a session is present and the admin bundle loads, so\nnone of this executes for anonymous visitors, which is why the pollution is observed **only\nwhen logged in**. All of this is core ApostropheCMS code (`node_modules/apostrophe/...`);\nit is not introduced by any project or starter kit content.\n\n### 3. The escalation gadget: Vue element mount (framework behavior; known, not novel)\n\nThe demonstrated payload pollutes the property `innerHTML`\n(`__proto__[innerHTML]=<img/src/onerror=alert(1)>`). The sink that consumes it is **Vue's\nstandard element-mount path**, not ApostropheCMS code. Confirmed in the bundled framework\n(`vue` / `@vue/runtime-core` / `@vue/runtime-dom` all **3.5.42**):\n\n`@vue/runtime-core` `mountElement`, prop enumeration (line ~5741):\n\n```js\nif (props) {\n  for (const key in props) {                              // for...in walks the prototype chain\n    if (key !== \"value\" && !shared.isReservedProp(key)) { // isReservedProp does NOT list innerHTML\n      hostPatchProp(el, key, null, props[key], ...);      // props[\"innerHTML\"] → inherited polluted value\n    }\n  }\n```\n\n`@vue/runtime-dom` `patchDOMProp` (line ~583), reached via `hostPatchProp`:\n\n```js\nfunction patchDOMProp(el, key, value, ...) {\n  if (key === \"innerHTML\" || key === \"textContent\") {\n    if (value != null) {\n      el[key] = key === \"innerHTML\" ? unsafeToTrustedHTML(value) : value;  // el.innerHTML = payload\n    }\n    return;\n  }\n```\n\nMechanism: whenever Vue mounts an element that has a non-null `props` object without its own\n`innerHTML` (routine during the admin render), `for (const key in props)` enumerates the\ninherited, enumerable `innerHTML` from `Object.prototype`; it passes the `\"value\"` and\n`isReservedProp` filters; `props[\"innerHTML\"]` resolves to the attacker's payload; and\n`patchDOMProp` writes it to `el.innerHTML`. `unsafeToTrustedHTML` is Vue's Trusted-Types\nwrapper, not a sanitizer, a passthrough unless Trusted Types is enforced (not the default).\n\nThis gadget is a well-documented, essentially universal client-side-PP > XSS escalation in Vue applications.\nIt is **not claimed as a novel finding** and is **not ApostropheCMS's to fix**, it cannot\nbe removed without changing Vue. Its relevance here is that it makes the (1) pollution\nreliably exploitable in any ApostropheCMS admin session.\n\n## Proof of Concept\n\nPrerequisite: a running ApostropheCMS instance and any authenticated session (a `guest`\naccount suffices). The tester/victim must be logged in.\n\n**A. Prototype pollution (console-verifiable):**\n\n1. Log in as any user.\n2. Navigate to: `https://TARGET/?__proto__[prop]=polluted`\n3. In the browser console: `Object.prototype.prop` > returns `\"polluted\"`.\n\n**B. DOM-based XSS:**\n\n1. Log in as any user.\n2. Navigate to:\n   `https://TARGET/?__proto__[innerHTML]=%3Cimg/src/onerror%3dalert(1)%3E`\n3. `alert(1)` executes in the victim's authenticated origin.\n\nTo capture the sink stack for evidence: DevTools > Sources > open the admin bundle >\npretty-print > search `unsafeToTrustedHTML` (or `=== \"innerHTML\"`) > line breakpoint in the\n`patchDOMProp` innerHTML branch > reload the logged-in payload URL > inspect `value` and\nwalk the call stack up through `hostPatchProp` to `mountElement`'s `for…in`.\n\nBoth A and B were reproduced against ApostropheCMS 4.32.2 (Vue 3.5.42) in Chrome, Firefox, and Edge browsers.\n\n## Impact\n\nAny party who can coerce an authenticated ApostropheCMS user to open a crafted URL can\nexecute arbitrary JavaScript in that user's session. Because the escalation gadget is a\nguaranteed-present Vue behavior, this is a reliable exploit, not a theoretical primitive.\nConsequences scale with the victim's role:\n\n- **Any authenticated victim:** actions and data reads available to that account; theft of\n  the session cookie / CSRF token from the authenticated context.\n- **Editor/admin victim:** the injected script can invoke the authenticated management REST\n  APIs as the victim, creating or modifying documents and user accounts, changing\n  configuration and possibly leading to account takeover and potential full compromise of the CMS\n  instance.\n\nPrototype pollution can additionally affect unrelated code paths that read inherited\nproperties, so other gadgets beyond the demonstrated Vue `innerHTML` sink may exist.\n\n## Remediation\n\nThe fix belongs in ApostropheCMS, at the source (1). The gadget (3) is framework behavior\nand cannot be relied upon to change, so sanitizing `parseQuery` is the correct fix.\n\n**Primary fix: reject prototype-affecting keys in `parseQuery`/`patch()`**:\n\n```js\napos.http.parseQuery = function(query) {\n  query = query.replace(/^\\?/, '');\n  const data = {};\n  const DANGEROUS = new Set([ '__proto__', 'constructor', 'prototype' ]);\n  query.split('&').forEach(function(pair) {\n    // ... unchanged ...\n  });\n  return data.root || {};\n\n  function patch(key, value) {\n    let match;\n    let parentKey = 'root';\n    let context = data;\n    key = decodeURIComponent(key);\n    const path = key.split('[');\n    let dangerous = false;\n    path.forEach(function(subKey) {\n      const cleanKey = subKey.replace(']', '');\n      if (DANGEROUS.has(cleanKey)) {   // refuse to traverse into prototype-affecting keys\n        dangerous = true;\n        return;\n      }\n      // ... existing subKey handling ...\n    });\n    if (dangerous) {\n      return;                          // discard this parameter entirely\n    }\n    // ... existing assignment ...\n  }\n};\n```\n\n**Defense in depth:**\n- Replace the truthy guard at **(A)** with an own-property check:\n  `if (!Object.prototype.hasOwnProperty.call(context, parentKey))`, so a key can never\n  descend into an inherited prototype.\n- Build `data` and any created containers with `Object.create(null)` so intermediate objects\n  have no prototype chain to reach.\n\n**Interim mitigation for operators:** restrict who holds authenticated accounts, and be\naware that opening untrusted links while logged in can trigger this. There is no server-side\nconfiguration toggle that disables the vulnerable client behavior.\n\n## References\n\n- Source (ApostropheCMS): `apostrophe/modules/@apostrophecms/util/ui/src/http.js` —\n  `parseQuery()` / `patch()`\n- Trigger (ApostropheCMS):\n  `apostrophe/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextBar.vue` —\n  `data()` (~line 64), `refresh()` (~line 606)\n- Escalation gadget (Vue 3.5.42, framework behavior): `@vue/runtime-core` `mountElement`\n  prop enumeration (~line 5741); `@vue/runtime-dom` `patchDOMProp` innerHTML branch\n  (~line 583)\n- Related but distinct: CVE-2026-53609 / GHSA-6h5j-32cf-4253 (server-side prototype\n  pollution via `apos.util.set()` / `$pullAll`, fixed in 4.31.0)\n- CWE-1321; CWE-79\n\n## Credit\n\n### Github Account Username: `Xx-LoGiCaL-xX`\n\n---",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "apostrophe"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.33.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-m2m5-rw3w-cwmj"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apostrophecms/apostrophe/commit/9500b8b0e1d630d5e07fbb5fd2c25ed0943845ce"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apostrophecms/apostrophe/commit/f84fd41cbf6c22eb8d0008fc9c25df1f7130b350"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apostrophecms/apostrophe"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apostrophecms/apostrophe/releases/tag/apostrophe@4.33.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321", "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-20T18:18:49Z",
    "nvd_published_at" : null
  }
}