lixin-wei / HZNUOJ

Hangzhou Normal University Online Judge

Home Page:http://acm.hznu.edu.cn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Insufficient SQL filtering results in xss injection

plr47 opened this issue · comments

description

The code problem occurred in OJ / admin-tools / cal_scores.php. The $ realname in the output form was obtained from the database. There was no filtering of angle brackets “<>” during registration, which caused the reorganization here. xss injection

image-20200225160853304

Attack process

首先注册一个账号,Class为"软工163",Real Name is 
<details open ontoggle=['yds_is_so_handsome'].find(\u0070rompt)>

image-20200225160712343

Then visit / OJ / admin-tools / cal_scores.php, set the classList to soft 软工163, and click submit

image-20200225161720115

the attack works

image-20200225161824168

poc

<details open ontoggle=['yds_is_so_handsome'].find(\u0070rompt)>