CVE-2021-24221

Quiz And Survey Master <= 7.1.11 - Authenticated SQL injection via shortcode

2021-03-26 00:00
Nguyen Van Khanh

Strategic Overview

Status
Patched in 7.1.12
Affected Version
<= 7.1.11
CVSS
8.8High
Weakness type
CWE-89 · Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
CVE
CVE-2021-24221
View all Quiz and Survey Master (QSM) – Quiz Maker & Survey Maker vulnerabilities

At a glance

CVE-2021-24221 is a high-severity Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in the Quiz and Survey Master (QSM) WordPress plugin, affecting versions <= 7.1.11. It carries a CVSS score of 8.8 (reachable over the network; low attack complexity; high confidentiality, integrity, availability impact). Exploitation requires an authenticated account. The issue is fixed in version 7.1.12; sites on affected versions should update now. Disclosed March 2021, reported by Nguyen Van Khanh.

Vulnerability Overview

The Quiz And Survey Master – Best Quiz, Exam and Survey Plugin for WordPress plugin before 7.1.12 did not sanitise the result_id GET parameter on pages with the [qsm_result] shortcode without id attribute, concatenating it in a SQL statement and leading to an SQL injection. The lowest role allowed to use this shortcode in post or pages being author, such user could gain unauthorised access to the DBMS. If the shortcode (without the id attribute) is embed on a public page or post, then unauthenticated users could exploit the injection.

Technical Analysis

The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no interaction from a victim user. A successful exploit has high impact on confidentiality, integrity, availability — full site compromise territory.

CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Reaching this weakness in Quiz and Survey Master (QSM) <= 7.1.11 takes any authenticated account. SQL injection happens when request data is concatenated into a query instead of being bound as a parameter, letting an attacker change the structure of the statement rather than just its values.

A working injection can read any table the database user can see, which on a WordPress install means user records, password hashes and session or API secrets stored in options. For Quiz and Survey Master (QSM) the fix is 7.1.12: builds <= 7.1.11 are affected, anything from 7.1.12 onward is not.

Remediation

Update to version 7.1.12, or a newer patched version

How does WordSec protect against this?

The attempt arrives as an ordinary request to Quiz and Survey Master (QSM): WordSec's web application firewall inspects request payloads before WordPress loads them. None of that substitutes for the fix: Quiz and Survey Master (QSM) 7.1.12 closes this, and updating the plugin is the step that ends it.

  • Firewall
  • Alerts

External References

Related records

Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C