🔍 CVE-2026-46338

4.3
CVSS Score
MEDIUM
2026-07-16
2026-10-24 20:10
✅ 완료

🇰🇷 한글 설명

PyMdown Extensions의 pymdownx.snippets 모듈에서 발생하는 취약점으로, restrict_base_path 설정이 활성화되어 있어도 동일한 접두사를 공유하는 형제 경로의 파일을 읽을 수 있습니다. 이는 CVE-2023-32309의 재발 현상이며, 특정 조건에서 의도하지 않은 파일 접근을 허용합니다.

💡 쉬운 설명

마크다운 문서 내에서 다른 파일을 불러올 때, 보안 설정이 되어 있어도 이름이 비슷한 다른 폴더의 파일을 몰래 읽어올 수 있는 문제입니다. 이를 통해 원래 접근하면 안 되는 내부 문서가 노출될 위험이 있습니다.

🇺🇸 원문 (English)

PyMdown Extensions is a set of extensions for the Python-Markdown markdown project. From 10.0.1 until 10.21.3, pymdownx.snippets uses a string-prefix containment check in SnippetPreprocessor.get_snippet_path() in pymdownx/snippets.py when `restrict_base_path: True`, allowing markdown snippet directives to read files from sibling paths that share the same base_path prefix, such as docs and docs_internal. This is a regression of CVE-2023-32309. This issue is fixed in version 10.21.3.

📍 영향받는 시스템

PyMdown Extensions 10.0.1 ~ 10.21.3 버전

⚔️ 공격 벡터

마크다운 스니펫 지시문을 사용하여 base_path와 접두사가 일치하는 형제 디렉토리의 파일 경로를 지정하여 읽기 시도

🛡️ 대응 방법

PyMdown Extensions를 10.21.3 이상의 최신 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 버전이 10.21.3 미만이면 취약한 상태이며, 10.21.3 이상이면 안전합니다.

Shell / Script
pip show pymdown-extensions | grep Version

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Python