🇰🇷 한글 설명
Gogs 0.14.3 미만 버전의 Jupyter Notebook(ipynb) sanitizer 엔드포인트에서 데이터 URI 스킴에 대한 제한이 부족하여 발생하는 XSS 취약점입니다. 인증 미들웨어가 없어 등록된 사용자라면 누구나 악성 HTML/JavaScript를 주입할 수 있습니다.
💡 쉬운 설명
Gogs라는 서비스의 특정 기능이 데이터 형식을 제대로 검사하지 않아, 공격자가 악성 코드를 심을 수 있는 상태입니다. 이를 통해 로그인된 사용자의 정보를 훔치거나 웹사이트를 조작할 수 있습니다.
🇺🇸 원문 (English)
Gogs is an open source self-hosted Git service. Prior to 0.14.3, the Jupyter Notebook (ipynb) sanitizer endpoint at POST /-/api/sanitize_ipynb allows arbitrary data: URIs without proper restrictions, potentially leading to Cross-Site Scripting (XSS). The endpoint uses bluemonday.UGCPolicy() with p.AllowURLSchemes("data") which permits all data URI schemes including data:text/html, enabling attackers to inject malicious HTML/JavaScript. Additionally, the endpoint has no authentication middleware, allowing any registered user to exploit this vulnerability. This vulnerability is fixed in 0.14.3.
📍 영향받는 시스템
Gogs versions prior to 0.14.3
⚔️ 공격 벡터
등록된 사용자가 POST /-/api/sanitize_ipynb 엔드포인트에 악성 data:text/html URI를 포함한 요청을 전송
🛡️ 대응 방법
Gogs를 0.14.3 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 0.14.3보다 낮은지 확인하십시오.
curl -s http://<target-ip>:<port>/version | grep -E '0\.[0-9]+\.[0-9]+'