CVE-2021-32708Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | php-league-flysystem | Fix pending | UBUNTU-CVE-2021-32708 | |
| Ubuntu 26.04 | php-league-flysystem | Under investigation | UBUNTU-CVE-2021-32708 | |
| Ubuntu 25.10 | php-league-flysystem | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-32708 | |
| Ubuntu 24.04 | php-league-flysystem | Under investigation | UBUNTU-CVE-2021-32708 | |
| Ubuntu 22.04 | php-league-flysystem | Under investigation | UBUNTU-CVE-2021-32708 | |
| Ubuntu 16.04 | php-league-flysystem | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-32708 | |
| Debian 14 | php-league-flysystem | Fixed | 1.1.3-4 | DEBIAN-CVE-2021-32708 |
| Debian 13 | php-league-flysystem | Fixed | 1.1.3-4 | DEBIAN-CVE-2021-32708 |
| Debian 12 | php-league-flysystem | Fixed | 1.1.3-4 | DEBIAN-CVE-2021-32708 |
| Packagist library | league/flysystem | Fixed | 2.1.1 | GHSA-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.
- thephpleague flysystem: affected: < 1.1.4, >= 2.0.0, < 2.1.1
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- https://github.com/thephpleague/flysystem/security/advisories/GHSA-9f46-5r25-5wfm
- https://github.com/thephpleague/flysystem/commit/a3c694de9f7e844b76f9d1b61296ebf6e8d89d74
- https://github.com/thephpleague/flysystem/commit/f3ad69181b8afed2c9edf7be5a2918144ff4ea32
- https://packagist.org/packages/league/flysystem
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RNZSWK4GOMJOOHKLZEOE5AQSLC4DNCRZ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NWPTENBYKI2IG47GI4DHAACLNRLTWUR5/
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.