🇰🇷 한글 설명
Pivotick의 Markdown 노드 참조 렌더러가 공격자가 제어하는 nodeName 값을 HTML 이스케이프 없이 data-node-name 속성과 <span> 본문에 삽입합니다. 노드 참조 토크나이저가 대괄호만 차단하여 따옴표, 꺾쇠괄호 등을 포함한 악성 노드명으로 속성을 탈출하고 이벤트 핸들러를 주입할 수 있습니다. DOMPurify 등 정화 처리가 없는 소비자에서 악성 그래프나 노트를 렌더링하면 피해자 브라우저에서 임의의 JavaScript가 실행될 수 있습니다.
💡 쉬운 설명
악의적인 사람이 이름에 특수문자를 넣은 노드를 만들어 공유하면, 이를 열어본 사용자의 브라우저에서 원치 않는 스크립트가 실행될 수 있습니다. 이로 인해 사용자의 세션을 악용하거나 화면 내용이 조작될 위험이 있습니다.
🇺🇸 원문 (English)
Pivotick’s Markdown node-reference renderer failed to HTML-escape the attacker-controlled nodeName value before interpolating it into both the data-node-name attribute and the body of a generated <span> element.
Because the node-reference tokenizer rejected only square brackets, a crafted node name could still contain quotation marks, angle brackets, or other HTML metacharacters. An attacker could therefore terminate the quoted attribute or inject additional HTML elements and event-handler attributes.
When malicious node-reference content is rendered by a consumer that does not apply DOMPurify or equivalent sanitization, arbitrary JavaScript may execute in the victim’s browser in the security context of the application. Successful exploitation requires a victim to open or render a crafted graph or note and could allow the attacker to access same-origin information, modify displayed content, or perform actions using the victim’s session.
The patch resolves the issue by applying context-appropriate HTML escaping to node names before inserting them into either HTML text or quoted attribute values. The shared escaping function now encodes ampersands, angle brackets, and both types of quotation marks.
📍 영향받는 시스템
Pivotick 노드 참조 렌더러를 사용하는 버전 (패치 이전 버전, 정확한 버전 정보 미상)
⚔️ 공격 벡터
공격자가 특수 HTML 문자를 포함한 노드명을 가진 그래프/노트를 제작해 피해자가 렌더링하도록 유도
🛡️ 대응 방법
Pivotick을 패치된 최신 버전으로 업데이트하고, 렌더링 결과에 DOMPurify 등 HTML 정화 처리를 적용
🔧 검증 코드
출력된 버전이 패치 적용 버전 이상인지 확인하며, 버전 정보가 없거나 이전 버전이면 취약한 것으로 판단하여 업데이트가 필요합니다.
pivotick --version 2>/dev/null || npm ls pivotick 2>/dev/null