Skip to content

Commit 40b989b

Browse files
authored
All advisories 2026 q4 m1 (#5663)
* Add failing test for GHSA-5gc8-frw3-3vqm * Add failing test for GHSA-c9rx-x947-fp3h * sanitize-html: bound recursion into discarded iframe fallback and carry nesting depth (GHSA-c9rx-x947-fp3h) * Use unguessable file names for export downloads (GHSA-5gc8-frw3-3vqm) * Add failing test for GHSA-rqgm-cfrp-4hx8 * Add failing test for GHSA-7jg5-frgc-c67w * Add failing test for GHSA-5m22-7pfq-vp65 * Add failing test for GHSA-rw26-wwfc-9wvm * Escape widget style wrapper attributes and reject unsafe style values (GHSA-7jg5-frgc-c67w) * Ignore sort keys and field filters hidden by publicApiProjection in public REST API requests (GHSA-rqgm-cfrp-4hx8) * Require the import owner for clean-export and a login for override-duplicates (GHSA-rw26-wwfc-9wvm) * Require publish permission for published documents written by import (GHSA-5m22-7pfq-vp65) * Reword GHSA-5m22-7pfq-vp65 changeset * Add failing test for GHSA-vmgj-9cwm-cf3h * Add failing test for GHSA-vh56-5m88-39rq * Require the whole color field value to be a valid color (GHSA-vmgj-9cwm-cf3h) * Add failing test for GHSA-jf5h-36mg-rp6x * Remove viewPermission fields from all page REST responses, including embedded _ancestors and _children (GHSA-vh56-5m88-39rq) * Add failing test for GHSA-rqgm-cfrp-4hx8: projection of embedded ancestors and children * Bind import duplicate replacement to the server-side analysis and authorize the actual target (GHSA-jf5h-36mg-rp6x) * Limit embedded ancestors and children to publicApiProjection in anonymous page REST requests (GHSA-rqgm-cfrp-4hx8) * Add failing test for GHSA-f66c-mpj2-3r8h * Add failing test for GHSA-9g7p-m758-rp72 * Require editing permission for the slug-taken route (GHSA-f66c-mpj2-3r8h) * Limit import archive extraction and clean up after failed imports (GHSA-9g7p-m758-rp72) * Add failing test for pending import archive exposure (GHSA-5gc8-frw3-3vqm) * Add failing test for related-doc forbidden fields (GHSA-vh56-5m88-39rq) * Test that public API search results stay sorted by search quality (GHSA-rqgm-cfrp-4hx8) * Add failing core tests for GHSA-5m22-7pfq-vp65 * Encrypt pending import archives kept in uploadfs (GHSA-5gc8-frw3-3vqm) * Revert encryption of pending import archives An unguessable name is enough here, see the following commits. * Update failing test for pending import archive names (GHSA-5gc8-frw3-3vqm) * Remove viewPermission fields from related documents in page and piece REST responses (GHSA-vh56-5m88-39rq) * Cover anonymous public API access to related documents (GHSA-vh56-5m88-39rq) * Use unguessable names for pending import archives (GHSA-5gc8-frw3-3vqm) * Honor publishRole and the document's own mode for published edits in core (GHSA-5m22-7pfq-vp65) * Add failing test for big upload chunk ids (GHSA-5gc8-frw3-3vqm) * Use unguessable ids for big upload chunks (GHSA-5gc8-frw3-3vqm) * Add failing test for forbidden fields in REST write responses (GHSA-vh56-5m88-39rq) * Add failing test for GHSA-rqgm-cfrp-4hx8: projection of related documents * Use generateId for export names; revert pending archive and big upload changes (GHSA-5gc8-frw3-3vqm) cuid2 3.x already draws on the platform's cryptographically secure random number generator, so pending import archive names and big upload chunk ids were already unguessable. * Add failing test for GHSA-rqgm-cfrp-4hx8: projection of related pages * Remove viewPermission fields from page and piece REST write responses (GHSA-vh56-5m88-39rq) * Add failing test for GHSA-rqgm-cfrp-4hx8: projection of related images * Limit related documents to the publicApiProjection of their own type in public REST API responses (GHSA-rqgm-cfrp-4hx8) * Add failing test for viewPermission fields in version change lists (GHSA-vh56-5m88-39rq) * Leave viewPermission fields out of version change lists (GHSA-vh56-5m88-39rq) * Add failing tests for viewPermission fields in version change counts and highlights (GHSA-vh56-5m88-39rq) * Leave viewPermission fields out of version change counts and highlights (GHSA-vh56-5m88-39rq) * Revert limiting related documents to their own type's publicApiProjection Relationships only appear in public API responses when the developer lists them in publicApiProjection, and their fields can be limited with the relationship's own projection. * Remove inaccurate mitigating factor from changeset (GHSA-5gc8-frw3-3vqm) * Compare public API search order with the database's own ranking (GHSA-rqgm-cfrp-4hx8) * Leave mode and publish authorization of replaced documents to core (GHSA-jf5h-36mg-rp6x) Writes go through core with permission checks on, which enforces publishRole, and archives with inconsistent modes are rejected when they are read. Keep only the import-specific type check on the replaced document. * Fix GHSA-7jg5-frgc-c67w at the attribute sink only Drop the render-time style value and class token filtering and the getWidgetElements id escaping; escaping in getWidgetAttributes covers it. * Check the login for clean-export once, in its route (GHSA-rw26-wwfc-9wvm) * Restore upstream handling of tar entry types and unsupported uploads (GHSA-9g7p-m758-rp72) The limits and the cleanup wrapper already cover both. * Record test versions in distinct milliseconds so their order does not depend on the database (GHSA-vh56-5m88-39rq) * Remove viewPermission fields once, in the shared REST API route wrapper (GHSA-vh56-5m88-39rq) * Trust the request mode in core, enforce publishRole in core only, keep import's mode validation (GHSA-5m22-7pfq-vp65)
1 parent 97c8a28 commit 40b989b

52 files changed

Lines changed: 4747 additions & 128 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"apostrophe": patch
3+
---
4+
5+
Security: the color field accepted any value that merely contained a valid `rgb()`, `hsl()` or similar color, so extra content before or after the color was stored as-is. When such a color is used by a widget style field rendered inline (no `selector`), that content reached the wrapper's `style` attribute and could inject HTML attributes into the published page. The whole value must now be a valid color, otherwise it is discarded like any other invalid color. Legitimate values (hex, named colors, `transparent`, `rgb()`/`rgba()`/`hsl()`/`hsla()` notations, CSS variable names) are stored unchanged. Exploitation requires permission to edit content using a color field (CWE-20, CWE-79, GHSA-vmgj-9cwm-cf3h).
6+
7+
Thanks to [N.HARSHA VARDHAN](https://github.com/saiharsha0546-dot) for reporting the vulnerability.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@apostrophecms/import-export": patch
3+
---
4+
5+
Security: the `clean-export` and `override-duplicates` routes did not require a login. Also, `clean-export` would discard the pending files of an import started by someone else and mark any import job as completed, without checking who owned either. Both routes now require a logged-in user. `clean-export` only acts on an import uploaded by the caller, and only ends that caller's own job. Import jobs are now recorded as belonging to the user who started them. Exposure was limited because the pending import's ID is random and only shown to the user who uploaded it, so in practice an attacker could only interfere with an import they could already identify (CWE-306, CWE-862, CWE-639, GHSA-rw26-wwfc-9wvm).
6+
7+
Thanks to [Liuhuo Wan](https://github.com/CoSunshine) for reporting the vulnerability.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"apostrophe": patch
3+
---
4+
5+
Security: widget style values were written into the generated wrapper's `style` and `class` attributes without HTML attribute escaping, so a project-defined free-form `string` style field could be used by an editor to inject additional HTML attributes into the published page. All attribute values rendered by `getWidgetAttributes()` and the `apos.styles.attributes()` helper are now escaped. Only projects that define a free-form style field are affected, and exploitation requires permission to edit the widget (CWE-79, CWE-116, GHSA-7jg5-frgc-c67w).
6+
7+
Thanks to [Fariskhi Vidyan](https://github.com/farisv) for reporting the vulnerability.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@apostrophecms/import-export": patch
3+
---
4+
5+
Security: extracting an import archive had no limit on the size or number of the files it wrote, so a small, highly compressed archive could fill the server's disk, and a failed import left the uploaded archive, its copy in uploadfs and its partial extraction behind. Extraction now stops as soon as the archive goes over a limit on the number of entries (100,000 by default) or on the total extracted size (100 times the size of the archive, at least 64MB, by default), counted on the bytes actually written. The limits can be changed with the new `importLimits` option of the module. Everything an import uploaded or extracted is removed whenever it fails. Exploiting this required a logged-in user (CWE-400, CWE-409, CWE-459, GHSA-9g7p-m758-rp72).
6+
7+
Thanks to [Mufeed VH](https://github.com/mufeedvh) and [Vivek R](https://github.com/123vivekr) for reporting the vulnerability.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@apostrophecms/import-export": patch
3+
---
4+
5+
Security: when continuing an import after the user confirmed which duplicates to replace, the server trusted the list of documents and replacement targets sent back by the browser, and checked the importable type against the imported file rather than against the existing document being overwritten. A logged-in user allowed to import could overwrite documents the import never offered to replace, including documents of types they may not import, and continue the import of another user. The duplicates found by the import are now remembered on the server for the user who started it, the browser can only narrow that list down, and the type of every replaced document must be importable (CWE-639, CWE-863, GHSA-jf5h-36mg-rp6x).
6+
7+
Thanks to [Mufeed VH](https://github.com/mufeedvh) and [Vivek R](https://github.com/123vivekr) for reporting the vulnerability.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@apostrophecms/import-export": patch
3+
"apostrophe": patch
4+
---
5+
6+
Security: importing could write the published version of documents the importing user was not allowed to publish. A contributor could create or replace published content with a crafted archive, and an editor could import or update published documents of a type whose `publishRole` is `admin`. Import now refuses documents whose mode, locale and `_id` disagree. Exploiting this required a logged-in user allowed to import the type.
7+
8+
The rest was a gap in the core permission check, fixed there, which also covers import. A type's `publishRole` was always meant to govern its published content, but editing or creating the published version of a document did not honor it: an editor could change published documents of a type whose `publishRole` is `admin`, including through the REST API, without publishing them through the normal workflow. That was a bug and should not have been relied upon. Editing or creating a published document now requires the `publishRole`. Types with `autopublish: true`, types without a draft/published distinction, and permission checks made with a type name rather than a document are unchanged (CWE-285, CWE-863, GHSA-5m22-7pfq-vp65).
9+
10+
Thanks to [Mufeed VH](https://github.com/mufeedvh) and [Vivek R](https://github.com/123vivekr) for reporting the vulnerability.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"apostrophe": patch
3+
---
4+
5+
Security: fields restricted by `viewPermission` are now removed from every document in every REST API response (`apiRoutes` and `restApiRoutes` of all modules) for a user who lacks that permission, not just from the documents requested from the page and piece REST APIs. This includes documents loaded through relationships (also nested and reverse relationships, and relationships inside widgets, array fields and object fields), the related pages embedded in page responses (`_ancestors` and `_children`), the home page response, page `autocomplete` results, areas rendered with `render-areas`, and the documents returned after a write: `POST`, `PUT` and `PATCH` (including archiving, restoring and moving pages), publish, unpublish, revert, localize and share, as well as `GET /api/v1/@apostrophecms/doc/:_id` and a single document version. The document version history also no longer reveals changes to those fields: the change list of a version (`GET /api/v1/@apostrophecms/document-versions/:versionId/changes`) leaves them out, the change counts of the version list and of a single version no longer count them, and a version's document with `annotate=1` no longer highlights them as changed. Saving a document without those fields in the request body still leaves their stored values untouched, as before. Each document is filtered according to its own type's schema. A `project` query parameter can also no longer exclude `type` or `metaType`, which could previously be used to keep a page's restricted fields in the response. The reported problems with `GET /api/v1/@apostrophecms/page/:_id`, which in 4.32.2 and earlier ignored type-level `viewRole` and did not remove `viewPermission` fields, were already corrected in 4.33.0 and are now covered by additional tests. Enforcing `viewRole` on that route was always the intended behavior, and the earlier behavior was a bug that should not have been relied upon. This only affects sites that use `viewPermission`. Anonymous visitors were affected only where a `publicApiProjection` includes a relationship to documents of a type with such fields (CWE-200, CWE-863, GHSA-vh56-5m88-39rq).
6+
7+
Thanks to [harshavardhan98899-lab](https://github.com/harshavardhan98899-lab) for reporting the vulnerability.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"apostrophe": patch
3+
---
4+
5+
Security: for anonymous REST API requests restricted by `publicApiProjection`, the `sort` query parameter and the per-field filter query parameters could operate on fields excluded by the projection, revealing the relative order of hidden values or which documents had a given hidden value. Sort keys and field filters not permitted by the projection are now ignored for these requests. In addition, the related pages embedded in anonymous page REST API responses (`_ancestors` and `_children`) were not limited to `publicApiProjection` when the projection included `path`; they now are. Authenticated requests and API key requests are not affected. Only sites that set `publicApiProjection` were affected. Full text search (`search`, `autocomplete`) is unchanged: it covers every field not marked `searchable: false`, exactly as the public site search does, so sensitive text fields should be marked `searchable: false` (CWE-200, CWE-639, GHSA-rqgm-cfrp-4hx8).
6+
7+
Thanks to [N.HARSHA VARDHAN](https://github.com/saiharsha0546-dot) for reporting the vulnerability.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"sanitize-html": patch
3+
---
4+
5+
Security: since 2.18.0, the fallback markup of a discarded `<iframe>` was re-sanitized by a recursive call with no limit, one level per nested unclosed `<iframe>`. A few kilobytes of crafted input could throw `RangeError: Maximum call stack size exceeded` with the default options, and the `nestingLimit` option was not enforced across the fallback because each nested call started counting from zero. The fallback of a discarded `<iframe>` is still sanitized and kept, but only up to eight nested `<iframe>` elements (deeper fallback is escaped as text, as before 2.18.0), and the current nesting depth now carries into the nested call so `nestingLimit` applies to the whole output. Only 2.18.0 was affected, and the exception is thrown synchronously, so applications that catch errors from `sanitizeHtml` only lost the affected request (CWE-674, GHSA-c9rx-x947-fp3h).
6+
7+
Thanks to [hkmj19](https://github.com/hkmj19), [JohnBeckley](https://github.com/JohnBeckley), and [amikhailovstiltsoft](https://github.com/amikhailovstiltsoft) for reporting the vulnerability.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"apostrophe": patch
3+
---
4+
5+
Security: the `slug-taken` route of `@apostrophecms/doc` told any logged-in user, including guests who cannot edit anything, whether a slug was in use, even by documents they could not view. It now requires the ability to edit content (the `view-draft` permission held by contributors, editors and admins). Because slugs are unique across all documents, users who can choose a slug still learn that it is already taken; this is inherent in globally unique slugs, and the route reveals nothing about the document beyond that (CWE-200, CWE-203, GHSA-f66c-mpj2-3r8h).
6+
7+
Thanks to [T.Jaswanth](https://github.com/Jaswanth080901) for reporting the vulnerability.

0 commit comments

Comments
 (0)