PatchClock

PHP security digest · 9 Nov 2026

FileGator: Missing authorization in POST /upload allows cross-user read and deletion of temporary files

Medium CVE-2026-94619

Package
filegator/filegator
Fixed in
7.15.0
Published
Mon 9 Nov 2026, 22:20 LisbonUpdated Thu 19 Nov 2026, 00:45 Lisbon
Installs on Packagist
2K

In plain words

A valid FileGator user with the upload permission can read, append to or delete other users' temporary files whose names they can learn or predict. In a multi-user deployment, this can expose batch archives and temporary plaintext file copies, and deleting a login rate-limit lockfile can defeat lockout. The flaw is confined to the shared temporary directory, not the whole filesystem.

Affected versions

PackageAffectedFixed in
filegator/filegator<= 7.14.47.15.0

How serious is it?

Medium is a CVSS score of 4.0 to 6.9: real impact, but the attacker needs something first, such as an account, a particular setting or a user who clicks a link. If your site meets that condition, treat it as High; if not, ship the fix in your next planned release.

filegator/filegator has 2K installs on Packagist, so the advisory reaches a modest number of projects, which does not make yours any safer.

Am I affected?

Check composer.lock for filegator/filegator at version 7.14.4 or earlier; 7.15.0 is fixed. Check whether your deployment has multiple users with distinct homedir values and whether a low-privileged user has the upload permission in the admin UI. The cross-user disclosure involves shared temporary objects, including batch archives and temporary file copies created during archive building. The fix for GHSA-f74m-x83r-c4v4 does not prevent this route.

Did you install filegator/filegator, or did a dependency?

Composer says why a package is in your project:

composer why filegator/filegator

If the output names your own project, you required filegator/filegator directly and the update is yours to make. If it names another package, filegator/filegator came in through it, and that package's version constraint decides which release you can install. To see what stands between you and the fix, ask Composer directly:

composer why-not filegator/filegator 7.15.0

Every line it prints is a constraint that blocks 7.15.0. Update the package it names, or raise your own constraint, and run it again until it prints nothing.

What to do

Check which version you have, then update to a fixed release for your branch (7.15.0):

composer show filegator/filegator | grep versions
composer update filegator/filegator

If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.

If you cannot update yet

Do not use the request-supplied filename as a storage key. Namespace the assembly file per user, for example by reusing the existing $prefix, and carry the display filename separately for storage->store(). Applying only the character filter to resumableFilename is not sufficient and would corrupt legitimate upload filenames.

Check the whole project at once

Composer 2.4 and later can list every installed package with a known advisory, this one included once Packagist has it:

composer audit --locked

--locked reads composer.lock instead of the vendor folder, so you can run it on a release tag or in CI without installing anything. It exits with a non-zero code when it finds an advisory, which is enough to fail a build. Run it on every branch you still support, not only the newest: an older release your customers run is affected in the same way.

Under the Cyber Resilience Act

CRA Article 14 timeline: aware of exploitation at hour 0, early warning within 24 hours, notification within 72 hours, final report within 14 days after the fix.

No exploitation of this vulnerability is known, so on its own it does not start the Article 14 reporting clock, which covers actively exploited vulnerabilities. That changes if you learn it is being exploited through your product: then the 24-hour early warning applies.

Either way, if filegator/filegator ships inside a product you sell, the CRA treats its vulnerabilities as yours. Article 13(5) asks for due diligence on the components you include, and from 11 December 2027 Annex I asks you to ship security fixes without delay and free of charge for the support period you declared. A short note in your changelog saying which release updated filegator/filegator, and why, is the evidence you will want later.

What goes in each Article 14 report · Does the CRA apply to your product?

filegator/filegator's record

This is one of 2 advisories for filegator/filegator in the digest, the first published on 9 November 2026. A package with several advisories is not worse than one with none, which often just means nobody looked; it does tell you to keep it on your update list and to run composer audit after each update.

Other advisories for filegator/filegator

  • CVE-2026-94618 · 9 Nov 2026 · Medium · fixed in 7.15.0 FileGator: Missing authorization in GET /batchdownload allows cross-user retrieval of another user's archive

The advisory's description

Summary

POST /upload uses the request-supplied resumableFilename directly as a key into the shared temporary directory, without the character filter it applies to resumableIdentifier and without namespacing it per user. A valid user holding the upload permission can read any file in that directory into their own home directory, append to it, and delete it.

This reproduces the cross-user batch-archive disclosure of GHSA-f74m-x83r-c4v4 through a different route — it still works with the fix for that advisory (PR #597) applied — and additionally allows deleting the login rate-limit lockfile.

Reported with explicit preconditions and bounded impact, as before: the primitive is confined to the temporary directory, not the whole filesystem.

Details

  • backend/Controllers/UploadController.php:61 — $file_name = $request->input('resumableFilename', 'file') is not passed through the preg_replace('/[^0-9a-zA-Z_]/', '', ...) that line 66 applies to resumableIdentifier.
  • Line 88 builds $prefix namespaced by the sanitized username, but $file_name reaches the temporary storage at lines 118, 121 and 125 without that prefix.
  • Line 115 — if ($chunks_size >= $total_size) is entered whenever resumableTotalSize is 0.
  • Lines 116-119 — the assembly loop for ($i = 1; $i <= $total_chunks; ++$i) does not execute when resumableTotalChunks is 0, so nothing is written to $file_name.
  • Line 121 — readStream($file_name) therefore reads the pre-existing temporary file of that exact name.
  • Line 122 — its contents are stored into the requester's own home directory.
  • Line 125 — remove($file_name) deletes it.

Path traversal outside the temporary directory is prevented by Tmpfs::sanitizeFilename(), so the primitive is bounded to that directory — but every user's transient objects share it.

PoC

Preconditions: a multi-user deployment with distinct per-user homedirs. The attacker is a valid low-privileged user holding upload (a first-class permission in the admin UI, and present in the shipped users.json.blank admin set).

  1. Victim creates a batch archive via POST /batchdownload; the JSON response returns the archive id.
  2. Attacker sends one POST /upload with resumableFilename=<victim's id>, resumableTotalChunks=0, resumableTotalSize=0, resumableRelativePath=/, and any small valid file part.
  3. Response is {"data":"Stored"}. The victim's archive is now byte-identical in the attacker's home directory, retrievable through the ordinary GET /download. The victim's temporary archive has been deleted.

Verified end to end with a PHPUnit test against current master; the archive contents matched byte for byte. Test file available on request.

Impact

Missing authorization (CWE-862) on temporary storage objects.

  • Cross-user disclosure of any transient object whose name the attacker can learn or predict. This includes batch archives — so GHSA-f74m-x83r-c4v4's impact remains reachable even with its fix applied — and the plaintext per-file copies that ZipArchiver::addFileFromStorage() writes while an archive is being built (those still use uniqid(), which is timestamp-derived).
  • Arbitrary delete within the temporary directory. AuthController::login() stores the login rate-limit counter as md5($ip).'.lock' in that same directory (backend/Controllers/AuthController.php:36, checked at line 44, written at line 58). An attacker can compute their own lockfile name and delete it, defeating the lockout.
  • Arbitrary append: with resumableTotalChunks >= 1, line 118 write($file_name, ..., true) appends attacker-controlled bytes to an arbitrary existing temporary file.

Remediation

Do not use the request-supplied filename as a storage key. Namespace the assembly file per user — for example reuse the existing $prefix — and carry the display filename separately for the storage->store() call.

Note that simply applying the [^0-9a-zA-Z_] filter to resumableFilename would corrupt legitimate uploads (sample.txt becomes sampletxt), because $final['filename'] is what becomes the stored name. The fix needs the namespacing, not just the filter.

Weakness: CWE-862 Missing Authorization. Reported by Yunnn-Yulio, alcalbg.

CWE-862. Missing authorization: an action checks that you are logged in but not that you are allowed to do it.

The advisory

From OSV.dev, which gathers the GitHub Advisory Database, FriendsOfPHP and Drupal security advisories; the summary is theirs. The description, affected versions, weakness and credits are from the GitHub Advisory Database (CC BY 4.0). "In plain words", "Am I affected?" and "If you cannot update yet" are based on that advisory, and checked to name no version it does not.