WPScan
How it worksPricing
Vulnerabilities
WordPressPluginsThemesStatsSubmit vulnerabilities
For developers
StatusAPI detailsCLI scanner
Contact
WPScan
How it worksPricing
Vulnerabilities
WordPressPluginsThemesStatsSubmit vulnerabilities
For developers
StatusAPI detailsCLI scanner
Contact

WordPress Plugin Vulnerabilities

Yes/No Chart < 1.0.12 - Authenticated (contributor+) Blind SQL Injection

Description

The plugin did not sanitise its sid shortcode parameter before using it in a SQL statement, allowing medium privilege users (contributor+) to perform Blind SQL Injection attacks

Proof of Concept

To exploit, the site administrator must add a question set and a question first. (This requirement is usually met for all installations, as this plugin does not function without this.)

Users as low as contributors can then use a shortcode to cause blind SQL injection, which can be used to extract data by checking if the error message returned says "invalid ID" or "no question".

This proof of concept shortcode can be added and previewed to check if a user "teacher" is registered, given db prefix "wp_dbprefix_":

[yesno_chart sid="9999999 UNION SELECT 4,user_login,user_registered FROM wp_dbprefix_users WHERE user_login='teacher'"]

If this shows "Invalid Question Set ID." when previewed, the WHERE clause for the UNION SELECT is evaluated FALSE. If this shows "No question.", the WHERE clause is evaluated TRUE. If this is not reliable, choose larger integers instead of 9999999. (the vulnerable WHERE clause must be evaluated FALSE.)

Of course, the attacker can issue arbitrary WHERE clause checks on arbitrary tables, so this is a reliable blind SQL injection.

Note:  this cannot be exploited as a non-blind SQLi, as the code that is just below the injection point uses prepared statement, and triggers a error before showing extracted data. 

Affects Plugins

yesno
Fixed in version 1.0.12

References

CVE
CVE-2021-24360

Classification

Type

SQLI

OWASP top 10
A1: Injection
CWE
CWE-89

Miscellaneous

Original Researcher

apple502j

Submitter

apple502j

Verified

Yes

WPVDB ID
d9586453-cc5c-4d26-bb45-a6370c9427fe

Timeline

Publicly Published

2021-05-31 (about 1 years ago)

Added

2021-05-31 (about 1 years ago)

Last Updated

2021-06-01 (about 1 years ago)

Our Other Services

WPScan WordPress Security Plugin
WPScan

Vulnerabilities

WordPressPluginsThemesOur StatsSubmit vulnerabilities

About

How it worksPricingWordPress pluginNewsContact

For Developers

StatusAPI detailsCLI scanner

Other

PrivacyTerms of serviceDisclosure policy
jetpackIn partnership with Jetpack
githubtwitterfacebook
Angithubendeavor
Work With Us