| 제목 | yangzongzhuan RuoYi 4.8.3 Cross-Site Scripting |
|---|
| 설명 | RuoYi 4.8.3 contains stored cross-site scripting in the role user-view page. Any authenticated user can update their own userName; the role view formatter later concatenates that value into a data-search HTML attribute without attribute encoding. A crafted display name executes script when a privileged user views role membership details.
Affected flow: self-service userName -> role user list JSON -> searchKey -> data-search attribute. Attack prerequisites: authenticated attacker; victim can view role membership details.
Reproduction: (1) Update the attacker's own display name with a quote-breaking attribute payload. (2) Confirm the exact value is stored and returned by the role user-list endpoint. (3) Open the role membership view and interact with the crafted user card.
Fresh verification marker: gt481022 / gt481022ry43. Three independent runs returned the exact quote-breaking userName from storage. Sanitized payload: userName: gt481022" onclick = eval(name). The rendered pattern is <div class="user-card" data-search="...injected attribute...">.
Confirmed source/sink in ruoyi-admin/src/main/resources/templates/system/role/view.html lines 593-596:
var searchKey = [u.userName || '', u.loginName || '', u.phonenumber || ''].join('|').toLowerCase();
var card = ['<div class="user-card" data-search="' + searchKey + '">', ...].join('');
Database persistence and the unescaped trigger response were confirmed in all 3/3 fresh runs. CWE-79. CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N (5.4). |
|---|
| 원천 | ⚠️ https://github.com/yangzongzhuan/RuoYi/blob/master/ruoyi-admin/src/main/resources/templates/system/role/view.html |
|---|
| 사용자 | sanktsimone (UID 102457) |
|---|
| 제출 | 2026. 10. 24. AM 06:10 (1 월 ago) |
|---|
| 모더레이션 | 2026. 11. 23. AM 07:40 (1 month later) |
|---|
| 상태 | 수락 |
|---|
| VulDB 항목 | 442255 [yangzongzhuan RuoYi 까지 4.8.3 Role Management User-View view.html renderUserCards userName 크로스 사이트 스크립팅] |
|---|
| 포인트들 | 20 |
|---|