High

ApostropheCMS: Unauthenticated CSV import requests leave rejected uploads in the system temporary directory

  • Disclosed: 20.10.2026
  • Updated: 20.10.2026 21:26

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-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, 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 bs=1M count=1

Obtain the normal site cookies and send the rejected upload:

bash
curl -c cookies.txt 'http://127.0.0.1:3000/' > /dev/null

curl -i -b cookies.txt \
  -F 'file=@rejected.txt;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:

bash
ls -lt /tmp

A 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.

What to do

Upgrade to ApostropheCMS version 4.33.0 or later.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package apostrophe < 4.33.0 4.33.0

References

CVSS score 7.5/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness (CWE)
CWE-400, CWE-459, CWE-770
Platform
npm
Package
apostrophe
Disclosed
20.10.2026
Updated
20.10.2026 21:26

Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.

OSV / GitHub Advisory Database - GHSA-qhcq-9pm2-c9w9 - CC BY 4.0

Vulnerability history: apostrophe

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (27) in the archive
Total entries
27
First → latest
09.2020 10.2026
Without a fix
4
Exploited in attacks
0

Severity breakdown

  • Critical 2
  • High 8
  • Medium 13
  • Low 4

Disclosures per year

  1. 2020: 2
  2. 2021: 2
  3. 2022: 0
  4. 2023: 0
  5. 2024: 0
  6. 2025: 0
  7. 2026: 23
Severity:
  1. ApostropheCMS: Unauthenticated CSV import requests leave rejected uploads in the system temporary directory this entry
    High · 7.5 CVE-2026-113658 < 4.33.0 4.33.0
  2. High · 7.3 CVE-2026-45011 = 4.29.0 no fix
  3. Critical · 9.8 CVE-2021-25979 >= 2.63.0, < 3.4.0 3.4.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.