league/flysystem is vulnerable to Improper Input Validation
43
Medium Risk
The WhitespacePathNormalizer class validates paths by scanning for control characters with a preg_match call that uses the Unicode modifier. When a path contains malformed UTF-8, preg_match returns false instead of a match count, and the truthy check treats that failure as a clean path so CorruptedPathDetected is never thrown. Because this normalizer is the default across the Local, FTP, SFTP, S3, and other adapters, file names carrying invalid UTF-8 bytes together with embedded terminal escape or control sequences pass validation and are stored. The fix compares the preg_match result against zero so both malformed UTF-8 and real matches are rejected as corrupted paths.
You are affected if you are using a version that falls within the vulnerable range and you store or list file names derived from untrusted input.
league/flysystem is vulnerable to Improper Input Validation in versions 0.1.0 - 3.35.2.
Upgrade the league/flysystem library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.