GHSA-86WM-68PQ-5JWQ
Vulnerability from github – Published: 2026-10-21 13:51 – Updated: 2026-10-21 13:51Summary
A potential unauthenticated denial-of-service vulnerability exists in the chunked import upload path used by @apostrophecms/import-export.
The affected import API routes invoke:
self.apos.http.bigUploadMiddleware()
before the actual import handler performs its authentication check.
Because no authorize callback is supplied to bigUploadMiddleware(), unauthenticated requests can reach the aposBigUpload start, chunk, and end operations before the later req.user check rejects the import.
As a result, an unauthenticated remote attacker can create server-side upload state, write chunk data to upload storage, trigger temporary-file processing, and cause attacker-controlled cleanup operations before authentication is enforced.
Affected Component
Package:
@apostrophecms/import-export
Confirmed affected version:
3.6.2
Potential earlier affected versions:
The issue may affect earlier 3.x releases in which the current big-upload-based import implementation is present. I have not yet fully verified the exact introduction version and recommend that the maintainers confirm the affected version range.
Vulnerability Type
Primary:
CWE-400 — Uncontrolled Resource Consumption
Related:
CWE-306 — Missing Authentication for Critical Function
CWE-770 — Allocation of Resources Without Limits or Throttling
Technical Details
The page import route registers the following middleware chain:
packages/import-export/modules/@apostrophecms/import-export-page/index.js
importExportImport: [
self.apos.http.bigUploadMiddleware(),
async (req) => {
return self.apos.modules['@apostrophecms/import-export']
.import(req, self.__meta.name);
}
]
No authorize callback is passed to bigUploadMiddleware().
The bigUploadMiddleware() implementation explicitly supports an authorize callback and performs that authorization before processing the aposBigUpload protocol when supplied.
Without that callback, requests containing:
aposBigUpload[type]=start
aposBigUpload[type]=chunk
or
aposBigUpload[type]=end
are processed immediately.
The actual authentication check occurs later in:
packages/import-export/lib/methods/import.js
async import(req, moduleName) {
if (!req.user) {
throw self.apos.error('forbidden');
}
This means authentication occurs only after the chunked-upload middleware has already performed server-side work.
Attack Flow
1. Start
An unauthenticated attacker submits an aposBigUpload[type]=start request.
The server generates an upload ID and stores attacker-supplied upload metadata, including the declared chunks count.
2. Chunk
The attacker can upload chunk data.
bigUploadChunk() copies attacker-controlled data into:
/big-uploads/<id>-<n>-<chunk>
3. End
The attacker sends an aposBigUpload[type]=end request.
bigUploadEnd() begins processing the upload and creates temporary files before invoking the downstream import handler.
Only after this processing completes does execution reach the later authentication check in import().
4. Cleanup amplification
The attacker-controlled chunks value is also used by bigUploadCleanupOne():
for (const { chunks } of Object.values(bigUpload.files)) {
for (let i = 0; (i < chunks); i++) {
await ufs.remove(...);
}
}
No small upper bound on the declared chunk count appears to be enforced at upload initialization.
This allows an unauthenticated attacker to increase the number of filesystem cleanup operations performed for an upload.
Proof of Concept
The following reproduction was performed only against an isolated test environment.
Start an upload without authentication
curl -s -X POST \
'http://localhost:3000/api/v1/@apostrophecms/page/importExportImport?aposBigUpload[type]=start' \
-H 'Content-Type: application/json' \
--data '{"files":{"file":{"name":"evil.tar.gz","size":4,"type":"application/gzip","chunks":1}}}'
The server returns an upload ID despite the request having no authenticated session.
Upload a chunk
printf 'PWN!' >/tmp/chunk.bin
curl -s -X POST \
'http://localhost:3000/api/v1/@apostrophecms/page/importExportImport?aposBigUpload[type]=chunk&aposBigUpload[id]=<ID>&aposBigUpload[n]=0&aposBigUpload[chunk]=0' \
-F 'chunk=@/tmp/chunk.bin;type=application/octet-stream'
The request succeeds and causes server-side upload storage to be used.
Finalize the upload
curl -i -X POST \
'http://localhost:3000/api/v1/@apostrophecms/page/importExportImport?aposBigUpload[type]=end&aposBigUpload[id]=<ID>'
Observed behavior:
startreturns HTTP 200 and an upload ID without authentication.chunkreturns HTTP 200 and results in server-side chunk storage.endeventually reaches the downstream authentication check and is rejected.- However, the server-side big-upload processing has already occurred before that authentication rejection.
In my isolated harness:
chunks=1resulted in one cleanup removal attempt.chunks=50resulted in 50 cleanup removal attempts.
This demonstrates that the attacker-controlled chunk count directly influences server-side cleanup work.
Security Impact
The vulnerability allows an unauthenticated remote attacker to cause server-side storage and filesystem operations that should only be reachable by authorized import users.
Possible consequences include:
- Consumption of upload and temporary storage.
- Creation of server-side upload state by unauthenticated users.
- Repeated filesystem I/O.
- Cleanup amplification based on attacker-controlled chunk counts.
- Potential service degradation or denial of service when the attack is repeated or sufficiently amplified.
Root Cause
Authentication is enforced in the downstream import handler rather than before the chunked-upload middleware.
The middleware itself already supports an authorize callback specifically for preventing unauthorized use of the big-upload functionality.
Suggested Remediation
Require authentication before any aposBigUpload operation is processed.
For example:
- Pass an appropriate
authorizecallback tobigUploadMiddleware()on all import routes. - Reject unauthenticated users before
start,chunk, orend. - Enforce reasonable limits on declared chunk counts.
- Validate declared size against actual uploaded data.
- Introduce per-user and global storage/rate limits.
- Ensure temporary files are removed when downstream processing fails.
- Add regression tests confirming that anonymous
start,chunk, andendrequests are rejected before upload state or files are created.
Relevant reviewed commit:
d3ff8c9bb001be1acf7fdc3f035190250ac64b45
Researcher Credit
Kai Zhi
GitHub:
https://github.com/kaizhi888
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "apostrophe"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.33.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "@apostrophecms/import-export"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.7.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-113711"
],
"database_specific": {
"cwe_ids": [
"CWE-400",
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-21T13:51:21Z",
"nvd_published_at": "2026-10-20T18:17:21Z",
"severity": "HIGH"
},
"details": "## Summary\n\nA potential unauthenticated denial-of-service vulnerability exists in the chunked import upload path used by `@apostrophecms/import-export`.\n\nThe affected import API routes invoke:\n\n`self.apos.http.bigUploadMiddleware()`\n\nbefore the actual import handler performs its authentication check.\n\nBecause no `authorize` callback is supplied to `bigUploadMiddleware()`, unauthenticated requests can reach the `aposBigUpload` `start`, `chunk`, and `end` operations before the later `req.user` check rejects the import.\n\nAs a result, an unauthenticated remote attacker can create server-side upload state, write chunk data to upload storage, trigger temporary-file processing, and cause attacker-controlled cleanup operations before authentication is enforced.\n\n## Affected Component\n\nPackage:\n\n`@apostrophecms/import-export`\n\nConfirmed affected version:\n\n`3.6.2`\n\nPotential earlier affected versions:\n\nThe issue may affect earlier 3.x releases in which the current big-upload-based import implementation is present. I have not yet fully verified the exact introduction version and recommend that the maintainers confirm the affected version range.\n\n## Vulnerability Type\n\nPrimary:\n\n**CWE-400 \u2014 Uncontrolled Resource Consumption**\n\nRelated:\n\n**CWE-306 \u2014 Missing Authentication for Critical Function**\n\n**CWE-770 \u2014 Allocation of Resources Without Limits or Throttling**\n\n## Technical Details\n\nThe page import route registers the following middleware chain:\n\n`packages/import-export/modules/@apostrophecms/import-export-page/index.js`\n\n```javascript\nimportExportImport: [\n self.apos.http.bigUploadMiddleware(),\n async (req) =\u003e {\n return self.apos.modules[\u0027@apostrophecms/import-export\u0027]\n .import(req, self.__meta.name);\n }\n]\n```\n\nNo `authorize` callback is passed to `bigUploadMiddleware()`.\n\nThe `bigUploadMiddleware()` implementation explicitly supports an `authorize` callback and performs that authorization before processing the `aposBigUpload` protocol when supplied.\n\nWithout that callback, requests containing:\n\n`aposBigUpload[type]=start`\n\n`aposBigUpload[type]=chunk`\n\nor\n\n`aposBigUpload[type]=end`\n\nare processed immediately.\n\nThe actual authentication check occurs later in:\n\n`packages/import-export/lib/methods/import.js`\n\n```javascript\nasync import(req, moduleName) {\n if (!req.user) {\n throw self.apos.error(\u0027forbidden\u0027);\n }\n```\n\nThis means authentication occurs only after the chunked-upload middleware has already performed server-side work.\n\n## Attack Flow\n\n### 1. Start\n\nAn unauthenticated attacker submits an `aposBigUpload[type]=start` request.\n\nThe server generates an upload ID and stores attacker-supplied upload metadata, including the declared `chunks` count.\n\n### 2. Chunk\n\nThe attacker can upload chunk data.\n\n`bigUploadChunk()` copies attacker-controlled data into:\n\n`/big-uploads/\u003cid\u003e-\u003cn\u003e-\u003cchunk\u003e`\n\n### 3. End\n\nThe attacker sends an `aposBigUpload[type]=end` request.\n\n`bigUploadEnd()` begins processing the upload and creates temporary files before invoking the downstream import handler.\n\nOnly after this processing completes does execution reach the later authentication check in `import()`.\n\n### 4. Cleanup amplification\n\nThe attacker-controlled `chunks` value is also used by `bigUploadCleanupOne()`:\n\n```javascript\nfor (const { chunks } of Object.values(bigUpload.files)) {\n for (let i = 0; (i \u003c chunks); i++) {\n await ufs.remove(...);\n }\n}\n```\n\nNo small upper bound on the declared chunk count appears to be enforced at upload initialization.\n\nThis allows an unauthenticated attacker to increase the number of filesystem cleanup operations performed for an upload.\n\n## Proof of Concept\n\nThe following reproduction was performed only against an isolated test environment.\n\n### Start an upload without authentication\n\n```bash\ncurl -s -X POST \\\n \u0027http://localhost:3000/api/v1/@apostrophecms/page/importExportImport?aposBigUpload[type]=start\u0027 \\\n -H \u0027Content-Type: application/json\u0027 \\\n --data \u0027{\"files\":{\"file\":{\"name\":\"evil.tar.gz\",\"size\":4,\"type\":\"application/gzip\",\"chunks\":1}}}\u0027\n```\n\nThe server returns an upload ID despite the request having no authenticated session.\n\n### Upload a chunk\n\n```bash\nprintf \u0027PWN!\u0027 \u003e/tmp/chunk.bin\n\ncurl -s -X POST \\\n \u0027http://localhost:3000/api/v1/@apostrophecms/page/importExportImport?aposBigUpload[type]=chunk\u0026aposBigUpload[id]=\u003cID\u003e\u0026aposBigUpload[n]=0\u0026aposBigUpload[chunk]=0\u0027 \\\n -F \u0027chunk=@/tmp/chunk.bin;type=application/octet-stream\u0027\n```\n\nThe request succeeds and causes server-side upload storage to be used.\n\n### Finalize the upload\n\n```bash\ncurl -i -X POST \\\n \u0027http://localhost:3000/api/v1/@apostrophecms/page/importExportImport?aposBigUpload[type]=end\u0026aposBigUpload[id]=\u003cID\u003e\u0027\n```\n\nObserved behavior:\n\n* `start` returns HTTP 200 and an upload ID without authentication.\n* `chunk` returns HTTP 200 and results in server-side chunk storage.\n* `end` eventually reaches the downstream authentication check and is rejected.\n* However, the server-side big-upload processing has already occurred before that authentication rejection.\n\nIn my isolated harness:\n\n* `chunks=1` resulted in one cleanup removal attempt.\n* `chunks=50` resulted in 50 cleanup removal attempts.\n\nThis demonstrates that the attacker-controlled chunk count directly influences server-side cleanup work.\n\n## Security Impact\n\nThe vulnerability allows an unauthenticated remote attacker to cause server-side storage and filesystem operations that should only be reachable by authorized import users.\n\nPossible consequences include:\n\n* Consumption of upload and temporary storage.\n* Creation of server-side upload state by unauthenticated users.\n* Repeated filesystem I/O.\n* Cleanup amplification based on attacker-controlled chunk counts.\n* Potential service degradation or denial of service when the attack is repeated or sufficiently amplified.\n\n## Root Cause\n\nAuthentication is enforced in the downstream import handler rather than before the chunked-upload middleware.\n\nThe middleware itself already supports an `authorize` callback specifically for preventing unauthorized use of the big-upload functionality.\n\n## Suggested Remediation\n\nRequire authentication before any `aposBigUpload` operation is processed.\n\nFor example:\n\n* Pass an appropriate `authorize` callback to `bigUploadMiddleware()` on all import routes.\n* Reject unauthenticated users before `start`, `chunk`, or `end`.\n* Enforce reasonable limits on declared chunk counts.\n* Validate declared size against actual uploaded data.\n* Introduce per-user and global storage/rate limits.\n* Ensure temporary files are removed when downstream processing fails.\n* Add regression tests confirming that anonymous `start`, `chunk`, and `end` requests are rejected before upload state or files are created.\n\nRelevant reviewed commit:\n\n`d3ff8c9bb001be1acf7fdc3f035190250ac64b45`\n\n## Researcher Credit\n\n**Kai Zhi**\n\nGitHub:\n\n**https://github.com/kaizhi888**",
"id": "GHSA-86wm-68pq-5jwq",
"modified": "2026-10-21T13:51:21Z",
"published": "2026-10-21T13:51:21Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-86wm-68pq-5jwq"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113711"
},
{
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "ApostropheCMS: Unauthenticated resource exhaustion via pre-auth aposBigUpload processing in @apostrophecms/import-export"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.