CVE-2021-32708
published 2021-06-24CVE-2021-32708: 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…
PriorityP348high8.1CVSS 3.1
AVNACHPRNUINSUCHIHAH
EPSS
3.49%
87.9th percentile
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.
Affected
9 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | php-league-flysystem | < php-league-flysystem 1.1.3-4 (bookworm) | php-league-flysystem 1.1.3-4 (bookworm) |
| fedoraproject | fedora | — | — |
| fedoraproject | fedora | — | — |
| league | flysystem | >= 0 < 1.1.4 | 1.1.4 |
| league | flysystem | >= 2.0.0 < 2.1.1 | 2.1.1 |
| thephpleague | flysystem | < 1.1.4 | 1.1.4 |
| thephpleague | flysystem | — | — |
| thephpleague | flysystem | >= 1.0.0 < 1.1.4 | 1.1.4 |
| thephpleague | flysystem | >= 2.0.0 < 2.1.1 | 2.1.1 |
CVSS provenance
nvdv3.18.1HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.09.3CRITICALAV:N/AC:M/Au:N/C:C/I:C/A:C
osv8.1HIGH
vendor_debian9.8CRITICAL
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem
osv·2021-06-29
CVE-2021-32708 [CRITICAL] Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem
Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem
### Impact
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:
- 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.
### Patches
GHSA
Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem
ghsa·2021-06-29
CVE-2021-32708 [CRITICAL] CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem
Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem
### Impact
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:
- 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.
### Patches
OSV
CVE-2021-32708: Flysystem is an open source file storage library for PHP
osv·2021-06-24·CVSS 8.1
CVE-2021-32708 [HIGH] CVE-2021-32708: Flysystem is an open source file storage library for PHP
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
Debian
CVE-2021-32708: php-league-flysystem - Flysystem is an open source file storage library for PHP. The whitespace normali...
vendor_debian·2021·CVSS 9.8
CVE-2021-32708 [CRITICAL] CVE-2021-32708: php-league-flysystem - Flysystem is an open source file storage library for PHP. The whitespace normali...
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
No detection rules found.
No public exploits indexed.
https://github.com/thephpleague/flysystem/commit/a3c694de9f7e844b76f9d1b61296ebf6e8d89d74https://github.com/thephpleague/flysystem/commit/f3ad69181b8afed2c9edf7be5a2918144ff4ea32https://github.com/thephpleague/flysystem/security/advisories/GHSA-9f46-5r25-5wfmhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NWPTENBYKI2IG47GI4DHAACLNRLTWUR5/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RNZSWK4GOMJOOHKLZEOE5AQSLC4DNCRZ/https://packagist.org/packages/league/flysystemhttps://github.com/thephpleague/flysystem/commit/a3c694de9f7e844b76f9d1b61296ebf6e8d89d74https://github.com/thephpleague/flysystem/commit/f3ad69181b8afed2c9edf7be5a2918144ff4ea32https://github.com/thephpleague/flysystem/security/advisories/GHSA-9f46-5r25-5wfmhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NWPTENBYKI2IG47GI4DHAACLNRLTWUR5/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RNZSWK4GOMJOOHKLZEOE5AQSLC4DNCRZ/https://packagist.org/packages/league/flysystem
2021-06-24
Published