CVE-2021-32708CWE-367

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

Critical · published June 24, 2021

CVSS v3.1
9.8
EPSS
3%
Percentile
89.1
In the wild
Unconfirmed
What it is

🔥 A crafty filename with the right whitespace could be your worst nightmare! Think of this vulnerability like a sneaky restaurant that lets guests order using cryptic codes; if they don’t verify the orders properly, anyone could slip something dangerous into the kitchen. That's how an attacker could upload and execute harmful code by taking advantage of improper checks on filenames! If exploited, an attacker could upload malicious files that execute arbitrary PHP code on your server! This means they could potentially gain full control over your system—read sensitive data, modify files, or even shut down your services. It's an absolute game-changer for security if left unaddressed!

Put simply

Think of this vulnerability like a sneaky restaurant that lets guests order using cryptic codes; if they don’t verify the orders properly, anyone could slip something dangerous into the kitchen. That's how an attacker could upload and execute harmful code by taking advantage of improper checks on filenames! This vulnerability arises from the way Flysystem normalizes whitespace in filenames, allowing attackers to bypass the extension deny-list when the filename includes Unicode whitespace characters. This flaw opens the door for remote code execution in directories where PHP code can be executed.

What to do

If exploited, an attacker could upload malicious files that execute arbitrary PHP code on your server! This means they could potentially gain full control over your system—read sensitive data, modify files, or even shut down your services. It's an absolute game-changer for security if left unaddressed! To secure your application, upgrade to Flysystem 1.1.4 or 2.1.1 immediately. It's crucial to ensure that any filename or path supplied by users is strictly validated against an allow-list, and absolutely reject any Unicode characters that may lead to exploitation. Don't let this slip through your cracks! You've got this! With these updates and checks in place, you’ll be back on track to security hero status in no time! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.03486 · 89.1th percentile
Weakness
CWE-367 · Time-of-check Time-of-use (TOCTOU) Race Condition
Published
2021-06-24T16:30Z
EPSS history
Timeline
  • 24 JUN 16:30Z
    Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem
    cvelistv5