kcve.ai취약점 정보 · 내 자산 확인

CVE-2022-24900 Absolute Path Traversal due to incorrect use of `send_file` call in Piano LED Visualizer

피아노 LED Visualizer에서 `send_file` 호출의 잘못된 사용으로 인한 절대 경로 횡단

설명

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.

피아노 LED Visualizer는 사람이 컴퓨터에 연결된 피아노를 연주 할 때 LED 조명을 밝힐 수있는 소프트웨어입니다. 버전 1.3 및 이전 버전은 경로 횡단 공격에 취약합니다. `os.path.join` 호출은 신뢰할 수 없는 입력과 함께 사용하기에 안전하지 않다. `os.path.join` 호출이 절대경로를 만나면, 그 시점까지 발생한 모든 파라미터를 무시하고 새로운 절대경로로 작업을 시작한다. "악성" 파라미터는 절대 경로를 나타내기 때문에, `os.path.join`의 결과는 정적 디렉토리를 완전히 무시한다. 따라서 신뢰할 수 없는 입력은 `os.path.join` 호출을 통해 `flask.send_file`로 전달되어 경로 트래버스 공격으로 이어질 수 있습니다. 수정된 패치는 GitHub 저장소의 `master` 브랜치에서 사용할 수 있습니다. 이것은 또한 취약한 `send_file` 기능에 대한 신뢰할 수 없는 데이터의 흐름을 방지함으로써 해결될 수 있다. 애플리케이션 로직이 이 동작을 필요로 하는 경우, `flask.safe_join`을 사용하여 신뢰할 수 없는 경로에 참여하거나 `flask.send_file` 호출을 `flask.send_from_directory` 호출로 대체 할 수 있습니다.

영향 받는 제품 제품 1개

  • onlaj

    Piano-LED-Visualizer

    영향 받는 버전

    • 1.3 이하

    해결 버전

    해결된 버전 정보가 없습니다.

참고 자료 5건

‹ 목록

점검 지원 범위 문의

도입 문의