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. ### Details The endpoint is: ```text POST /api/v1/@apostrophecms/rich-text-widget/generate-csv-table ``` In `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](https://github.com/apostrophecms/apostrophe/pull/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: ```bash dd if=/dev/zero of=rejected.txt
- Products
- apostrophe
- Affected versions
- Not specified
- Fixed versions
- 4.33.0
- CVEs
- CVE-2026-113658
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 13:14 UTC · Revision 1
Source evidence
ApostropheCMS: Unauthenticated CSV import requests leave rejected uploads in the system temporary directory
core-osv · Original sourcePublished 20 Oct 2026, 18:10 UTC
### 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: ```text POST /api/v1/@apostrophecms/rich-text-widget/generate-csv-table ``` In `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](https://github.com/apostrophecms/apostrophe/pull/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: ```bash dd if=/dev/zero of=rejected.txt
osv:GHSA-qhcq-9pm2-c9w9
apostrophe
Fixed versions: 4.33.0
Complete source record
{
"id": "cf9bc653b33eddd177581566021066ccaad2425e6b10777e4fe7551b2c59eaaa",
"url": "https://osv.dev/vulnerability/GHSA-qhcq-9pm2-c9w9",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ApostropheCMS: Unauthenticated CSV import requests leave rejected uploads in the system temporary directory",
"summary": "### 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: ```text POST /api/v1/@apostrophecms/rich-text-widget/generate-csv-table ``` In `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](https://github.com/apostrophecms/apostrophe/pull/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: ```bash dd if=/dev/zero of=rejected.txt ",
"evidence": "osv:GHSA-qhcq-9pm2-c9w9",
"products": [
{
"name": {
"value": "apostrophe",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "4.33.0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "GHSA-qhcq-9pm2-c9w9",
"aliases": [
"CVE-2026-113658",
"GHSA-qhcq-9pm2-c9w9"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "4.33.0"
}
]
}
],
"package": {
"name": "apostrophe",
"purl": "pkg:npm/apostrophe",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-qhcq-9pm2-c9w9/GHSA-qhcq-9pm2-c9w9.json"
}
}
],
"modified": "2026-10-20T18:15:04.533207440Z",
"provider": "osv",
"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",
"https://github.com/apostrophecms/apostrophe/releases/tag/apostrophe@4.33.0"
],
"provider_metadata": {
"cwe_ids": [
"CWE-400",
"CWE-459",
"CWE-770"
],
"severity": "HIGH",
"github_reviewed": true,
"nvd_published_at": null,
"github_reviewed_at": "2026-10-20T18:10:32Z"
}
},
"related_cves": [
{
"value": "CVE-2026-113658",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 390142,
"published_at": "2026-10-20T18:10:32+00:00"
}