Every CVE Search/ Get API key

CVE-2021-32708

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

9.8 CriticalPublic exploitFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

3.49%Up 1.7 points since Jun 25, 2021
90%50%10%1%

What each source reports

CVE List Score used 9.8

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

Record
CVE-2021-32708
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-367
Updated
2026-11-02
EUVDEUVD-2021-1300 9.8

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.

Record
EUVD-2021-1300
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-9f46-5r25-5wfm 9.8

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

The unicode whitespace removal has been replaced with a rejection (exception).

The library has been patched in:

Workarounds

For 1.x users, upgrade to 1.1.4. For 2.x users, upgrade to 2.1.1.

Record
GHSA-9f46-5r25-5wfm
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-367
Updated
2026-11-02
NVD 9.8

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.

Record
CVE-2021-32708
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
9.3 HighAV:N/AC:M/Au:N/C:C/I:C/A:C
Weakness
CWE-367
Updated
2026-11-02
OSV 8.1

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.

Record
CVE-2021-32708
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-32708 8.1

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.

Record
DEBIAN-CVE-2021-32708
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 4 moreShow less
OSVGHSA-9f46-5r25-5wfm 9.8

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

The unicode whitespace removal has been replaced with a rejection (exception).

The library has been patched in:

Workarounds

For 1.x users, upgrade to 1.1.4. For 2.x users, upgrade to 2.1.1.

Record
GHSA-9f46-5r25-5wfm
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-367
Updated
2026-11-02
OSVUBUNTU-CVE-2021-32708 9.8

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.

Record
UBUNTU-CVE-2021-32708
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVCLSA-2026-1777596493 No score

TuxCare security update for league/flysystem (1 CVE)

TuxCare rebuilt league/flysystem to address 1 CVE. Fixed in 1.1.10-p1+tuxcare.

Record
CLSA-2026-1777596493
Updated
2026-11-02
OSVCLSA-2026-1777596494 No score

TuxCare security update for league/flysystem (1 CVE)

TuxCare rebuilt league/flysystem to address 1 CVE. Fixed in 1.0.70-p1+tuxcare.

Record
CLSA-2026-1777596494
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
league/flysystem
Packagist
before 1.1.4
1.1.4
league/flysystem
Packagist
2.0.0 up to 2.1.1
2.1.1
league/flysystem
TuxCare:Packagist
1.1.10 up to 1.1.10-p1+tuxcare
1.1.10-p1+tuxcare
league/flysystem
TuxCare:Packagist
1.0.70 up to 1.0.70-p1+tuxcare
1.0.70-p1+tuxcare
php-league-flysystem
Debian:12
before 1.1.3-4
1.1.3-4
php-league-flysystem
Debian:13
before 1.1.3-4
1.1.3-4
php-league-flysystem
Debian:14
before 1.1.3-4
1.1.3-4
league/flysystem
Packagist
before 1.1.4, plus listed versions
0.1.00.1.10.1.100.1.110.1.12
Show 45 moreShow less
0.1.130.1.140.1.150.1.160.1.170.1.180.1.190.1.20.1.200.1.30.1.40.1.50.1.60.1.70.1.80.1.90.2.00.2.10.2.100.2.110.2.120.2.130.2.140.2.150.2.20.2.30.2.40.2.50.2.60.2.70.2.80.2.90.3.00.3.10.3.20.3.30.3.40.3.50.4.00.4.10.4.20.4.30.4.40.4.50.5.0
1.1.4
league/flysystem
Packagist
2.0.0 up to 2.1.1, plus listed versions
2.0.12.0.22.0.32.0.42.0.5
Show 4 moreShow less
2.0.62.0.72.0.82.1.0
2.1.1
php-league-flysystem
Ubuntu:16.04:LTS
All versions, plus listed versions
1.0.15-11.0.16-11.0.16-1build1
None known
Show 5 moreShow less
Affected packages
PackageAffectedFixed
php-league-flysystem
Ubuntu:22.04:LTS
All versions, plus listed versions
1.1.3-4
None known
php-league-flysystem
Ubuntu:24.04:LTS
All versions, plus listed versions
1.1.10-1
None known
php-league-flysystem
Ubuntu:25.10
All versions, plus listed versions
3.29.1-2
None known
php-league-flysystem
Ubuntu:26.10
All versions, plus listed versions
3.29.1-2
None known
php-league-flysystem
Ubuntu:26.04:LTS
All versions, plus listed versions
3.29.1-2
None known

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHubfazilbaig1/CVE-2021-327082024-10-19

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-32708 is a critical vulnerability (CVSS 9.8) in Thephpleague Flysystem, published June 24, 2021. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 3.49%, the 89th percentile. Fixed in league/flysystem 1.1.4.

References

Show 9 moreShow less
This page doesn't list everything

Left out here: 88 versions. The JSON record has them.

MoveEnter Open