Summary
ApostropheCMS import-export: NoSQL injection via update-key value lets a crafted import match and overwrite an unidentified document
@apostrophecms/import-export's update-by-key feature lets an imported
document carry a <field>:key property (for example slug:key) whose
value is used to find an existing document to update instead of inserting
a new one. getUpdateKey()/insertOrUpdateDocWithKey()
(lib/methods/import.js) use that value directly as a MongoDB query value
with no laundering:
const matchingDraftPromise = manager.findForEditing(
req.clone({ mode: 'draft' }),
{
aposMode: 'draft',
[updateField]: doc[updateKey]
}).toObject();
Archive documents are parsed with EJSON (see lib/formats/gzip.js), which
revives objects such as { $ne: null } as live values, the same untrusted
data source and revival mechanism already fixed once in this module forfindSingletonAposDocId/findParkedAposDocId in GHSA-79qf-vqgc-7xx3. That
fix did not touch insertOrUpdateDocWithKey, so the identical class of bug
survives here: a crafted "slug:key": { "$ne": null } entry in an
archive's aposDocs.json makes the import match (and then update) an
existing document the archive's author never actually identified, instead
of failing to find a match.
Affected versions
Confirmed on main branch HEAD as of 2026-09-04,packages/import-export/lib/methods/import.js.
Impact
Reaching this requires only an authenticated session with import access to
the target type (the built-in contributor role holds this, matching the
precondition of GHSA-79qf-vqgc-7xx3), and no admin interaction. Because the
match uses a MongoDB operator instead of an exact value, it is not limited
to a document the importer already knows the identifying field of: any
existing document the importer has generic edit rights on and that
satisfies the operator (which { $ne: null } trivially does for any doc
with a non-null value in that field) is a candidate, and Apostrophe'sfindForEditing permission filter, not the update-key logic, is the only
thing narrowing which document actually gets matched and overwritten.
Live-verified: a contributor-role request importing a document containing"slug:key": { "$ne": null } had its content applied to an existing,
unrelated draft article, overwriting its title, while the importer never
specified that article's real slug.
CVE-2026-113662 has a CVSS score of 5.4 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.7.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Launder doc[updateKey] to a plain string (mirroring the fix already
applied to type/aposLocale/parkedId in GHSA-79qf-vqgc-7xx3) before
using it as a query value, and fall back to the insert path when it is not
a usable string.
Frequently Asked Questions
- What is CVE-2026-113662? CVE-2026-113662 is a medium-severity security vulnerability in @apostrophecms/import-export (npm), affecting versions < 3.7.0. It is fixed in 3.7.0.
- How severe is CVE-2026-113662? CVE-2026-113662 has a CVSS score of 5.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of @apostrophecms/import-export are affected by CVE-2026-113662? @apostrophecms/import-export (npm) versions < 3.7.0 is affected.
- Is there a fix for CVE-2026-113662? Yes. CVE-2026-113662 is fixed in 3.7.0. Upgrade to this version or later.
- Is CVE-2026-113662 exploitable, and should I be worried? Whether CVE-2026-113662 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-113662 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-113662? Upgrade
@apostrophecms/import-exportto 3.7.0 or later.