// For flags

CVE-2022-24900

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

Severity Score

8.6
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

4
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

Piano LED Visualizer is software that allows LED lights to light up as a person plays a piano connected to a computer. Version 1.3 and prior are vulnerable to a path traversal attack. The `os.path.join` call is unsafe for use with untrusted input. When the `os.path.join` call encounters an absolute path, it ignores all the parameters it has encountered till that point and starts working with the new absolute path. Since the "malicious" parameter represents an absolute path, the result of `os.path.join` ignores the static directory completely. Hence, untrusted input is passed via the `os.path.join` call to `flask.send_file` can lead to path traversal attacks. A patch with a fix is available on the `master` branch of the GitHub repository. This can also be fixed by preventing flow of untrusted data to the vulnerable `send_file` function. In case the application logic necessiates this behaviour, one can either use the `flask.safe_join` to join untrusted paths or replace `flask.send_file` calls with `flask.send_from_directory` calls.

Piano LED Visualizer es un software que permite que las luces LED sean iluminadas mientras una persona toca un piano conectado a un ordenador. La versión 1.3 y anteriores son vulnerables a un ataque de salto de ruta. La llamada "os.path.join" no es segura para su uso con entradas no confiables. Cuando la llamada "os.path.join" encuentra una ruta absoluta, ignora todos los parámetros que ha encontrado hasta ese momento y comienza a trabajar con la nueva ruta absoluta. Dado que el parámetro "malicioso" representa una ruta absoluta, el resultado de "os.path.join" ignora completamente el directorio estático. Por lo tanto, la entrada no confiable que se pasa por medio de la llamada de "os.path.join" a "flask.send_file" puede conllevar a ataques de salto de ruta. Un parche con una corrección está disponible en la rama "master" del repositorio GitHub. Esto también puede corregirse al impedir el flujo de datos no confiables a la función vulnerable "send_file". En caso de que la lógica de la aplicación necesite este comportamiento, puede usarse "flask.safe_join" para unir rutas no confiables o sustituir las llamadas a "flask.send_file" por llamadas a "flask.send_from_directory"

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
Low
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-02-10 CVE Reserved
  • 2022-04-29 CVE Published
  • 2024-07-21 EPSS Updated
  • 2024-08-03 CVE Updated
  • 2024-08-03 First Exploit
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-73: External Control of File Name or Path
  • CWE-668: Exposure of Resource to Wrong Sphere
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Piano Led Visualizer Project
Search vendor "Piano Led Visualizer Project"
Piano Led Visualizer
Search vendor "Piano Led Visualizer Project" for product "Piano Led Visualizer"
<= 1.3
Search vendor "Piano Led Visualizer Project" for product "Piano Led Visualizer" and version " <= 1.3"
-
Affected