CVE-2022-24900CWE-22CWE-73

Absolute Path Traversal due to incorrect use of `send_file` call in Piano LED Visualizer

Critical · published April 29, 2022

CVSS v3.1
9.9
EPSS
8%
Percentile
95.0
In the wild
Unconfirmed
What it is

🚨 A crafty path traversal vulnerability lurks in versions 1.3 and earlier of Piano LED Visualizer, allowing attackers to access files outside the intended directory! 🔥 Think of it like a delivery driver who ignores the address on the package and just heads straight for a new destination instead. Instead of dropping off the package at the intended house, they wander into a neighboring property! An attacker can leverage this vulnerability to access sensitive files on the server, potentially reading personal data or configuration files, which could lead to further attacks. The consequences could be absolutely devastating as it might expose a treasure trove of sensitive information to the wrong hands!

Put simply

Think of it like a delivery driver who ignores the address on the package and just heads straight for a new destination instead. Instead of dropping off the package at the intended house, they wander into a neighboring property! This vulnerability arises from an unsafe use of `os.path.join` that fails to validate untrusted input properly. When given an absolute path as input, it completely disregards the static directory, resulting in the ability to traverse the file system and access unintended files via the `flask.send_file` function.

What to do

An attacker can leverage this vulnerability to access sensitive files on the server, potentially reading personal data or configuration files, which could lead to further attacks. The consequences could be absolutely devastating as it might expose a treasure trove of sensitive information to the wrong hands! Upgrade Piano LED Visualizer to the latest version where this vulnerability is patched. If immediate updating is not possible, prevent untrusted data from reaching `send_file`, or use `flask.safe_join` for joining paths. Additionally, consider replacing any calls to `flask.send_file` with `flask.send_from_directory` to tighten security! You've got this! Follow these steps, and you'll be well on your way to securing your setup! 🛡️

The record
Technical detail
CVSS v3.1
9.9 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:L
CVSS v4.0
Not supplied
EPSS
0.08410 · 95.0th percentile
Weaknesses
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'); CWE-73 · External Control of File Name or Path
Published
2022-04-29T13:50Z
EPSS history
Timeline
  • 29 APR 13:50Z
    Absolute Path Traversal due to incorrect use of `send_file` call in Piano LED Visualizer
    cvelistv5