🔍 CVE-2024-23633

4.7
CVSS Score
MEDIUM
2024-01-24
2026-06-17 07:13
✅ 완료

🇰🇷 한글 설명

오픈 소스 데이터 라벨링 도구인 Label Studio의 원격 가져오기 기능에서 발생하는 취약점입니다. 공격자가 악성 자바스크립트가 포함된 HTML 파일을 업로드하도록 유도하여, 사용자가 해당 파일을 열람할 경우 웹사이트 권한 내에서 임의의 스크립트를 실행하고 관리자 계정을 생성하는 등의 공격이 가능합니다.

💡 쉬운 설명

웹사이트에 외부 파일을 불러오는 기능이 있는데, 이를 악용해 가짜 웹페이지를 심는 공격입니다. 사용자가 이 파일을 클릭하면 해커가 관리자 권한을 뺏거나 정보를 훔칠 수 있습니다.

🇺🇸 원문 (English)

Label Studio, an open source data labeling tool had a remote import feature allowed users to import data from a remote web source, that was downloaded and could be viewed on the website. Prior to version 1.10.1, this feature could had been abused to download a HTML file that executed malicious JavaScript code in the context of the Label Studio website. Executing arbitrary JavaScript could result in an attacker performing malicious actions on Label Studio users if they visit the crafted avatar image. For an example, an attacker can craft a JavaScript payload that adds a new Django Super Administrator user if a Django administrator visits the image. `data_import/uploader.py` lines 125C5 through 146 showed that if a URL passed the server side request forgery verification checks, the contents of the file would be downloaded using the filename in the URL. The downloaded file path could then be retrieved by sending a request to `/api/projects/{project_id}/file-uploads?ids=[{download_id}]` where `{project_id}` was the ID of the project and `{download_id}` was the ID of the downloaded file. Once the downloaded file path was retrieved by the previous API endpoint, `data_import/api.py`lines 595C1 through 616C62 demonstrated that the `Content-Type` of the response was determined by the file extension, since `mimetypes.guess_type` guesses the `Content-Type` based on the file extension. Since the `Content-Type` was determined by the file extension of the downloaded file, an attacker could import in a `.html` file that would execute JavaScript when visited. Version 1.10.1 contains a patch for this issue. Other remediation strategies are also available. For all user provided files that are downloaded by Label Studio, set the `Content-Security-Policy: sandbox;` response header when viewed on the site. The `sandbox` directive restricts a page's actions to prevent popups, execution of plugins and scripts and enforces a `same-origin` policy. Alternatively, restrict the allowed file extensions that may be downloaded.

📍 영향받는 시스템

Label Studio 1.10.1 미만 버전

⚔️ 공격 벡터

원격 웹 소스에서 악성 HTML 파일을 가져오게 한 뒤, 사용자가 해당 파일의 경로를 통해 접근하도록 유도하여 자바스크립트 실행

🛡️ 대응 방법

Label Studio를 1.10.1 이상 버전으로 업데이트하거나, Content-Security-Policy: sandbox 헤더를 설정하거나, 허용된 파일 확장자를 제한해야 합니다.

🔧 검증 코드

출력된 버전 번호가 1.10.1보다 낮으면 취약한 상태입니다.

Shell / Script
pip show label-studio | grep Version

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N

💻 영향받는 소프트웨어

Spring Data REST