CVE-2026-113658: ApostropheCMS: Unauthenticated CSV import requests leave rejected uploads in the system temporary directory
Summary A rejected upload can remain in the operating system temporary directory. Multer writes the file before its extension is checked, and the rejection path does not remove that temporary file. An unauthenticated requester can repeat this with large files and steadily consume temporary disk space.
Published Oct 20, 2026
Affected packages
apostrophe
- Ecosystem
- npm
- Affected
- < 4.33.0
- Fixed in
- 4.33.0
- Check
npm ls apostrophe
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A rejected upload can remain in the operating system temporary directory.
Multer writes the file before its extension is checked, and the rejection path does not remove that temporary file. An unauthenticated requester can repeat this with large files and steadily consume temporary disk space.
Details
The endpoint is:
POST /api/v1/@apostrophecms/rich-text-widget/generate-csv-tableIn packages/apostrophe/modules/@apostrophecms/rich-text-widget/lib/apiRoutes.js, Multer first writes the upload to os.tmpdir(). The handler then rejects filenames whose extension is not csv, but there is no cleanup of the Multer file on this error path.
The route does not require an authenticated user. A normal CSRF cookie is sufficient.
During testing, the request returned HTTP 400 with Only csv files are supported, while the complete uploaded content remained in a randomly named file in the configured temporary directory after the response.
Relationship to prior public work
I reviewed PR #5013, which migrated the Rich Text CSV upload path from connect-multiparty to Multer. This report concerns cleanup after that migration: the rejected Multer file remains on disk, a behavior not described in the PR or its review discussion.
POC
Create a small test file. A larger file can be used to demonstrate disk growth, but 1 MiB is enough for a safe local reproduction:
dd if=/dev/zero of=rejected.txt bs=1M count=1Obtain the normal site cookies and send the rejected upload:
curl -c cookies.txt 'http://127.0.0.1:3000/' > /dev/null
curl -i -b cookies.txt \
-F '[email protected];filename=rejected.txt;type=text/plain' \
'http://127.0.0.1:3000/api/v1/@apostrophecms/rich-text-widget/generate-csv-table'The response is HTTP 400. Compare the contents of the system temporary directory before and after the request:
ls -lt /tmpA new randomly named file remains present and contains the uploaded bytes.
No login is required. Repeating the multipart request creates additional persistent temporary files.
Impact
A remote unauthenticated attacker can fill the partition used by the operating system temporary directory. Once that partition is exhausted, Apostrophe and unrelated services on the same host may fail to upload files, create temporary data, or continue operating normally.
The attack requires only repeated HTTP requests and the stored files remain after each rejected response.
Credited to bp0lr.
References
- https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-qhcq-9pm2-c9w9
- https://github.com/apostrophecms/apostrophe/commit/9500b8b0e1d630d5e07fbb5fd2c25ed0943845ce
- https://github.com/apostrophecms/apostrophe/commit/f84fd41cbf6c22eb8d0008fc9c25df1f7130b350
- https://github.com/apostrophecms/apostrophe/releases/tag/[email protected]
- https://github.com/advisories/GHSA-qhcq-9pm2-c9w9
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-112951
ApostropheCMS: Color field validation bypass allows stored XSS via HTML appended after rgb()/hsl() prefix
medium5.4Oct 21, 2026CVE-2026-112952
ApostropheCMS: POST /api/v1/@apostrophecms/doc/slugTaken discloses existence of private/admin-only content to any authenticated user
medium4.3Oct 21, 2026CVE-2026-112954
ApostropheCMS: Unauthenticated publicApiProjection bypass via search and sort query builders in the public REST API
medium5.3Oct 21, 2026CVE-2026-112957
ApostropheCMS: GET /api/v1/@apostrophecms/page/:id bypasses viewRole restriction and exposes viewPermission-gated fields to lower-privileged users
medium4.3Oct 21, 2026CVE-2026-112958
ApostropheCMS: Stored XSS via Unescaped Widget Style Attribute Serialization
medium5.4Oct 21, 2026CVE-2026-113649
ApostropheCMS: Import API bypasses publication roles for protected content
medium6.5Oct 21, 2026
