Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. league/flysystem
  4. ›
  5. CVE-2021-32708

CVE-2021-32708: Time-of-check Time-of-use (TOCTOU) Race Condition

June 24, 2021 (updated November 7, 2023)

Flysystem is an open source file storage library for PHP. The whitespace normalisation using 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.

References

  • nvd.nist.gov/vuln/detail/CVE-2021-32708

Code Behaviors & Features

Detect and mitigate CVE-2021-32708 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.0.0 before 1.1.4, all versions starting from 2.0.0 before 2.1.1

Fixed versions

  • 1.1.4
  • 2.1.1

Solution

Upgrade to versions 1.1.4, 2.1.1 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition

Source file

packagist/league/flysystem/CVE-2021-32708.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:23 +0000.