LimeSurvey Community Edition 7.0.5 contains an authenticated SQL injection vulnerability in the Central Participant Database (CPDB) workflow that copies survey participant tokens to the central participant list.
An authenticated low-privileged user with access to the participant panel can submit a crafted token-to-CPDB attribute mapping. The mapping value is used as a raw SQL SELECT expression against the survey token table. The SQL expression result is then persisted into lime_participant_attribute.value and can be retrieved through the normal participant JSON endpoint when the target CPDB attribute is visible.
The validated impact is sensitive data extraction from the application database, including administrator usernames and password hashes. The same code path also contains an unsafe update condition for lime_participant_attribute, but no arbitrary-table write or privilege escalation primitive was confirmed.
Vulnerability
Root cause
Controller-level permission is broader than the affected operation requires (ParticipantsAction.php:54-65):
A user with participantpanel:read can reach participant actions, including the affected mapping actions, without an additional operation-specific authorization check.
The selected token ID is stored from attacker-controlled POST data (ParticipantsAction.php:2674-2679):
No allowlist verifies that each mapping value is a real token-table column name, and no numeric validation verifies that each mapping key is a legitimate CPDB attribute ID before the array reaches the model.
The model forwards attacker-controlled mapping values into the SQL sink (Participant.php:2178-2181, Participant.php:2219-2222):
An authenticated low-privileged user with participant panel access can evaluate SQL expressions in the context of the LimeSurvey database user and persist the result in a CPDB attribute visible through the application.
Confirmed impact from the submitted evidence:
Extraction of local LimeSurvey usernames and password hashes from lime_users.
Multi-row data aggregation using MySQL GROUP_CONCAT.
Delivery of the extracted result through the standard authenticated getParticipantsJson endpoint.
Potential impact:
Reading sensitive survey, participant, and administrative database data.
Reading credential hashes for offline cracking.
Modifying existing records in lime_participant_attribute through the secondary unsafe update condition if the attacker controls the mapping key:
"participant_id='$participantId' AND attribute_id=$participantAttributeId"
"participant_id='$participantId' AND attribute_id=$participantAttributeId"
"participant_id='$participantId' AND attribute_id=$participantAttributeId"
"participant_id='$participantId' AND attribute_id=$participantAttributeId"
PoC
Preconditions
LimeSurvey Community Edition 7.0.5+260623.
MySQL or MariaDB backend.
Application reachable at http://127.0.0.1:8081.
An authenticated user with access to the participants controller. The submitted PoC used:
participantpanel:read
surveys:create
auth_db:read
A visible CPDB attribute that can store the SQL expression result.
A survey participant token selected through the token-to-CPDB mapping workflow.
Reproduction Summary
Deploy LimeSurvey 7.0.5.
Create a constrained attacker account.
Grant the attacker account participantpanel:read and enough permissions to create a self-contained test survey and log in locally.
Create a visible CPDB attribute.
Login as the attacker account.
Create a survey and a survey participant token through normal LimeSurvey endpoints.