Live › vulnerability › CVE-2026-113666
Go to dashboardThe @apostrophecms/db-connect package passes unvalidated dotted projection keys into a helper that deletes properties on the resolved object, so a crafted REST query can reach Object.prototype and delete a shared method. An authenticated user with view-draft (or any logged-in user when guestApiAccess is on) can break request handling for the whole Node process until it restarts.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-23 19:11 UTC, 3h before NVD. All times on this page are UTC.
| Product | Ecosystem | Affected | Fixed in |
|---|---|---|---|
| @apostrophecms/db-connect | npm | < 1.1.0 | 1.1.0 |
| apostrophe | npm | < 4.33.0 | 4.33.0 |
1.1.0 or apostrophe below 4.33.0, and whether the site uses the sqlite, postgres, or multipostgres adapter instead of mongodb1.1.0 or later and apostrophe to 4.33.0 or laterEach row is the first time that source carried this signal. The analyst’s rows are its own findings.
@apostrophecms/db-connect ships an in-memory MongoDB emulation used by its SQLite, PostgreSQL, and multipostgres adapters. Its unsetNestedField helper walks an attacker-controlled dotted field path with no segment validation and calls delete on the resolved property. A low-privileged authenticated user (any role holding view-draft, which every editor and contributor has; reduced to any logged-in user when guestApiAccess is enabled) can send a piece-type REST GET request whose project query builder contains an exclusion key such as constructor.prototype.hasOwnProperty. On a SQLite or PostgreSQL adapter this key reaches unsetNestedField, which resolves Object.prototype and deletes a shared runtime method. Because that method is shared across the whole Node process, the deletion breaks request handling for every tenant and user until the process is restarted, giving a single request a persistent denial of service.
The projection query builder laundens only projection values, never projection keys, so an arbitrary dotted key survives to the database layer. On the SQLite and PostgreSQL adapters an exclusion projection is applied in JavaScript by applyProjection, which for each excluded field calls unsetNestedField(result, field). unsetNestedField splits the field on . and walks the resulting segments with no guard: unlike its sibling setNestedField, it does not even block a literal __proto__, and neither helper blocks constructor or prototype. Because the working object is a plain object produced by JSON.parse(JSON.stringify(doc)), its constructor resolves to the global Object, so a path of constructor.prototype.<member> reaches the shared Object.prototype and deletes a core, configurable method. The violated invariant is that untrusted input must never be able to traverse into and mutate shared prototype objects.
Affected functions (repository-relative paths):
- unsetNestedField packages/db-connect/lib/shared.js:119-129 (no segment guard; delete on resolved property)
- applyProjection packages/db-connect/lib/shared.js:164-216 (exclusion branch calls unsetNestedField per excluded key)
Reachability driver (consumer on a SQL adapter):
- project.launder / project.finalize packages/apostrophe/modules/@apostrophecms/doc-type/index.js:2003-2103
- getRestQuery packages/apostrophe/modules/@apostrophecms/piece-type/index.js:1139-1157
- SQLite adapter applyProjection call packages/db-connect/adapters/sqlite.js:906,980
Prerequisites: an authenticated account holding view-draft (every editing role; any logged-in user when guestApiAccess: true), and a consumer configured to use a SQLite, PostgreSQL, or multipostgres adapter. The default mongodb adapter hands the projection to the real MongoDB driver and is not affected. With those conditions, a single crafted GET request deletes an attacker-chosen shared prototype method (for example Object.prototype.hasOwnProperty, toString, or an Array.prototype member). The demonstrated capability is a persistent, process-wide denial of service: after the deletion, ordinary calls such as obj.hasOwnProperty(...) throw across Apostrophe, its dependencies, and the database driver, so the affected Node process cannot service requests for any user until it is restarted. The attacker chooses which member to remove, and the corruption of shared runtime state persists for the life of the process.
The finding was reproduced by executing the shipped helper directly against the published db-connect source; a live consumer requires a SQLite or PostgreSQL adapter, an authenticated view-draft session, and at least one matching document.
view-draft on a site whose database adapter is sqlite, postgres, or multipostgres.GET /api/v1/@apostrophecms/article?project[constructor.prototype.hasOwnProperty]=0
Cookie: <authenticated view-draft session>
safe benign exclusion {title:0} leaves Object.prototype.hasOwnProperty intact
VULNERABLE exclusion projection deleted Object.prototype.hasOwnProperty (callableBefore=true, brokeEveryObject=true)
VULNERABLE exclusion projection deleted an arbitrary Object.prototype method (__pocMarker)
view-draft user calls the piece-type REST GET endpoint GET /api/v1/@apostrophecms/<piece-type>, which is reachable by any editing role.project[constructor.prototype.hasOwnProperty]=0 is parsed by qs (with allowDots off) into a single own key with literal dots, { 'constructor.prototype.hasOwnProperty': '0' }.getRestQuery applies the query builders first; project.launder copies the key verbatim and coerces only the value to false; project.finalize skips the falsy value with if (!val) continue and preserves the key; the cursor stores it as the projection.publicApiProjection override that would discard the attacker projection runs only when canAccessApi(req) is false, so it is skipped for the authenticated caller; no key allowlist, segment check, or prototype guard exists anywhere on the path.applyProjection takes the exclusion branch and calls , which resolves and executes .The relevant protections were examined individually and none blocks this path. The projection launder (packages/apostrophe/modules/@apostrophecms/doc-type/index.js:2003-2011) laundens values only and retains arbitrary keys. The publicApiProjection permission override (packages/apostrophe/modules/@apostrophecms/piece-type/index.js:1142-1156) is gated on !canAccessApi(req) and is therefore not taken for an authenticated view-draft caller. The finalize per-key loop (doc-type/index.js:2062-2069) short-circuits on the falsy exclusion value before it ever inspects the key. Most importantly, unsetNestedField (packages/db-connect/lib/shared.js:119-129) has no segment guard at all: its sibling setNestedField blocks a literal __proto__ but neither helper blocks constructor or prototype, and the constructor.prototype.<member> path bypasses even that partial __proto__ check. Attempts to disprove the finding all failed: routing the value to the inclusion branch (which uses setNestedField) does not occur because the value is falsy; the working object is a plain object from JSON.parse(JSON.stringify(doc)) so its constructor is the global ; and is configurable, so the delete succeeds. The seed prototype-pollution fix added a segment guard, but only in / in the separate package; the db-connect helpers were never hardened.
Ecosystem: npmPackage: @apostrophecms/db-connectConfirmed affected range: >= 1.0.0, <= 1.0.2Latest release checked: 1.0.2 (npm registry)Fix status: not fixedThe unguarded unsetNestedField and the exclusion-branch applyProjection call are byte-identical across the published stable releases 1.0.0, 1.0.1, and 1.0.2, and the SQLite and PostgreSQL adapters invoke applyProjection per returned document in all of them. No published release fixes the issue. The prerelease line (1.0.0-alpha.1, 1.0.0-alpha.2, 1.0.2-alpha.0) ships the same code but is out
This page as .md · .json · in your agent: get_signal("CVE-2026-113666")
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.
unsetNestedField(result, 'constructor.prototype.hasOwnProperty')Object.prototypedelete Object.prototype.hasOwnPropertyObjectObject.prototype.hasOwnProperty{__proto__, constructor, prototype}apos.util.setgetapostrophe