🔍 CVE-2026-44899

4.7
CVSS Score
MEDIUM
2026-05-26
2026-07-24 11:10
✅ 완료

🇰🇷 한글 설명

Mistune 3.2.1 이전 버전의 Image directive plugin에서 :width: 및 :height: 옵션의 검증이 불완전하여, 사용자 입력이 HTML style 속성에 이스케이프 처리 없이 직접 삽입됩니다. 이는 CSS 인젝션을 통한 XSS 공격을 가능하게 합니다.

💡 쉬운 설명

Mistune 마크다운 파서에서 이미지 크기 옵션을 잘못 검증하여 악의적인 코드가 삽입될 수 있습니다. 이를 이용하면 사용자의 브라우저에서 악의적인 스크립트를 실행시킬 수 있습니다.

🇺🇸 원문 (English)

Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, the Image directive plugin validates the :width: and :height: options with a regex compiled as _num_re = re.compile(r"^\d+(?:\.\d*)?"). When the validated value is not a plain integer, render_block_image() inserts it directly into a style="width:...;" or style="height:...;" attribute. Because the value was accepted by the prefix-only regex, any CSS after the leading digits reaches the style= attribute verbatim and without escaping. This vulnerability is fixed in 3.2.1.

📍 영향받는 시스템

Mistune < 3.2.1

⚔️ 공격 벡터

Image directive의 :width: 또는 :height: 옵션에 CSS 문법(예: 100;color:red;)을 포함한 값을 입력하여 style 속성에 주입

🛡️ 대응 방법

Mistune을 3.2.1 이상으로 업그레이드

🔧 검증 코드

Version 필드에서 3.2.1 이상이면 패치됨, 3.2.1 미만이면 취약함

Shell / Script
pip show mistune | 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

💻 영향받는 소프트웨어

Python