🔍 CVE-2024-3220

0.0
CVSS Score
UNKNOWN
2025-02-14
2026-10-22 01:16
✅ 완료

🇰🇷 한글 설명

Windows에서 CPython 표준 라이브러리의 mimetypes 모듈에 결함이 있어 기본 파일 위치('C:\etc\mime.types')가 사용자 쓰기 가능합니다. 공격자가 조작된 파일을 생성하여 Python 런타임 시작 시 MemoryError를 발생시키거나 파일 확장자를 잘못 해석하게 할 수 있습니다.

💡 쉬운 설명

Windows에서 Python의 파일 타입 설정이 누구나 수정 가능해서, 악의적인 파일을 만들어 Python을 크래시 시킬 수 있습니다. 다중 사용자 환경에서 권한 낮은 사용자도 공격을 시도할 수 있습니다.

🇺🇸 원문 (English)

There is a defect in the CPython standard library module “mimetypes” where on Windows the default list of known file locations are writable meaning other users can create invalid files to cause MemoryError to be raised on Python runtime startup or have file extensions be interpreted as the incorrect file type. This defect is caused by the default locations of Linux and macOS platforms (such as “/etc/mime.types”) also being used on Windows, where they are user-writable locations (“C:\etc\mime.types”). To work-around this issue a user can call mimetypes.init() with an empty list (“[]”) on Windows platforms to avoid using the default list of known file locations.

📍 영향받는 시스템

Windows 운영체제에서 실행되는 모든 CPython 버전 (Linux/macOS는 영향 없음)

⚔️ 공격 벡터

C:\etc\mime.types 위치에 악의적인 MIME 타입 파일을 생성하여 Python 시작 시 MemoryError 유발 또는 파일 타입 오해석

🛡️ 대응 방법

Python 코드에서 mimetypes.init([])을 호출하여 기본 파일 위치 사용을 비활성화

🔧 검증 코드

Shell / Script
python -c "import sys; print('Windows - Check CVE-2024-3220 status' if sys.platform=='win32' else 'Not Windows - Not affected')"

💻 영향받는 소프트웨어

Python