🇰🇷 한글 설명
Part-DB 2.12.1 미만 버전에서 LogEntryExtraFormatter 클래스의 특정 분기에서 사용자 입력값에 대한 HTML 이스케이프 처리가 누락되어 발생합니다. 공격자가 악성 스크립트가 포함된 하위 요소 이름을 설정하고 삭제하면, 관리자가 로그를 조회할 때 해당 스크립트가 실행되는 저장형 XSS 취약점이 존재합니다.
💡 쉬운 설명
부품 관리 시스템의 로그 기록 과정에서 보안 검사가 누락되어 발생한 문제입니다. 공격자가 특수한 이름을 가진 부품을 만들고 삭제하면, 관리자가 로그를 확인하는 순간 악성 코드가 실행될 수 있습니다.
🇺🇸 원문 (English)
Part-DB is an open source inventory management system for electronic components. Prior to version 2.12.1, LogEntryExtraFormatter builds the HTML shown in the "Extra" column of the activity-log table (/log) and in element history tables. Every branch of LogEntryExtraFormatter::getInternalFormat() runs user-controlled strings through htmlspecialchars() before placing them into the HTML it returns — except the CollectionElementDeleted branch, which interpolates getOldName() (and getCollectionName()) into a sprintf() template with no escaping. The returned string is emitted by LogEntryExtraColumn::render() and inserted as raw HTML into the DataTables cell (the bundle does not escape column output; sibling columns call htmlspecialchars() themselves). CollectionElementDeleted.getOldName() is the name of a deleted collection sub-element — a part Parameter, Attachment, PartLot, Orderdetail, etc. — all freely set by any user with edit rights on the owning element. A low-privileged content editor can therefore store an HTML/script payload as the name of such a sub-element, delete it (which writes the log entry), and have that markup parsed as live DOM in the browser of a higher-privileged victim (an administrator/auditor with system.show_logs, or any user viewing that element's history). This is a stored cross-site-scripting / HTML-injection defect caused by a single missed sanitizer in one sibling branch. CSP policies block inline javascript execution under normal conditions. This issue has been patched in version 2.12.1.
📍 영향받는 시스템
Part-DB version < 2.12.1
⚔️ 공격 벡터
권한이 있는 사용자가 악성 HTML/스크립트가 포함된 하위 요소 이름을 설정한 후 삭제하여 로그에 기록되도록 유도
🛡️ 대응 방법
Part-DB를 최신 보안 패치가 적용된 버전인 2.12.1 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 정보가 2.12.1 미만인 경우 해당 취약점에 노출된 상태입니다.
dpkg -l | grep part-db 2>/dev/null | grep -E 'version' || rpm -q part-db 2>/dev/null | grep -E 'version'