CVEfocus › CVE database › CVE-2021-32708

CVE-2021-32708Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem

CVSS 9.8 CriticalEPSS 3.5% (higher than 90% of CVEs)Published 2021-06-24Updated 2024-08-03Assigner: GitHub_M

Flysystem is an open source file storage library for PHP. The whitespace normalisation using in 1.x and 2.x removes any unicode whitespace. Under certain specific conditions this could potentially allow a malicious user to execute code remotely. The conditions are: A user is allowed to supply the path or filename of an uploaded file, the supplied path or filename is not checked against unicode chars, the supplied pathname checked against an extension deny-list, not an allow-list, the supplied path or filename contains a unicode whitespace char in the extension, the uploaded file is stored in a directory that allows PHP code to be executed. Given these conditions are met a user can upload and execute arbitrary code on the system under attack. The unicode whitespace removal has been replaced with a rejection (exception). For 1.x users, upgrade to 1.1.4. For 2.x users, upgrade to 2.1.1.

CWE-367

What to do

Fixed builds are available from Debian, Packagist: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed
1Fix pending
3Under investigation
2Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10php-league-flysystemFix pendingUBUNTU-CVE-2021-32708
Ubuntu 26.04php-league-flysystemUnder investigationUBUNTU-CVE-2021-32708
Ubuntu 25.10php-league-flysystemWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-32708
Ubuntu 24.04php-league-flysystemUnder investigationUBUNTU-CVE-2021-32708
Ubuntu 22.04php-league-flysystemUnder investigationUBUNTU-CVE-2021-32708
Ubuntu 16.04php-league-flysystemWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-32708
Debian 14php-league-flysystemFixed1.1.3-4DEBIAN-CVE-2021-32708
Debian 13php-league-flysystemFixed1.1.3-4DEBIAN-CVE-2021-32708
Debian 12php-league-flysystemFixed1.1.3-4DEBIAN-CVE-2021-32708
Packagist libraryleague/flysystemFixed2.1.1GHSA-9f46-5r25-5wfm

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.