CVE-2021-32708

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

HIGH
8.1
CVSS Score
Published: June 24, 2021 at 04:30 PM UTC
Updated: June 17, 2026 at 03:53 AM UTC
2 products affected across 2 vendorsFedoraFlysystem

Using flysystem by thephpleague?

Get instant alerts when new vulnerabilities affect flysystem - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.1
Exploit prediction
EPSS 3%

Description

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.1.4v < 2.1.11.0.0 ≤ v < 1.1.42.0.0 ≤ v < 2.1.1
Affected range stops below 1.1.4, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.1.1, so it looks safe — our inference, not a vendor statement

CVSS

Attack Vector
NETWORK
Complexity
HIGH
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-367

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card