/

CVE-2025-56421

Severity:

HIGH RISK

(7.5)

SQL Injection in LimeSurvey Pre-6.15.4+250710

CVE-2025-56421

Modified

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Information Disclosure via SQL Injection

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A SQL injection flaw in LimeSurvey allows crafted input to be interpreted as part of database queries, rather than as data.

Under certain conditions, a remote attacker can abuse this behavior to extract sensitive information from the LimeSurvey database, such as user data or survey contents.

Affected context

This vulnerability affects LimeSurvey installations running versions prior to 6.15.4+250710 where user-supplied data is interpolated into SQL queries without sufficient sanitization or parameterization.

The issue typically arises in HTTP-exposed application endpoints that accept request parameters and interact with the database layer.

It becomes relevant when LimeSurvey is deployed with network reachability from untrusted clients (e.g., internet-facing survey portals) and when the underlying database contains sensitive or regulated information.

Exploit preconditions

  • Attack surface: Web-facing LimeSurvey endpoints that consume user-supplied parameters and perform database operations.
  • Required access: Remote, unauthenticated or low-privileged access to affected functionality, depending on the specific vulnerable route.
  • Trigger point: Submission of specially crafted input fields (e.g., query parameters, form fields, or survey inputs) that are concatenated into SQL queries.
  • Why exploitation is possible: The application constructs SQL statements by directly embedding untrusted input, allowing attackers to alter the structure of the query instead of treating input as data only.

Why this happens

The root cause aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

At a design level, dynamic SQL statements are built by concatenating or interpolating raw user input into query strings, without enforcing strict parameterization or adequate escaping.

This insecure pattern treats incoming data as trusted and fails to establish a clear boundary between query logic and external data, enabling attackers to introduce additional predicates, UNION clauses, or other SQL syntax.

Potential impact

  • An attacker may retrieve sensitive records from LimeSurvey's database (e.g., survey responses, user accounts, contact lists).
  • An attacker could enumerate database schema details such as table names, column names, and metadata.
  • An attacker may bypass some logical restrictions by manipulating WHERE clauses or filters.
  • In certain environments, SQL-level abuse could facilitate further compromise, such as pivoting to other data sources connected to the same database.

General mitigation guidance

SQL injection defenses generally focus on enforcing strict separation between SQL code and user data:

  • Prefer parameterized queries / prepared statements in all database access layers, avoiding string concatenation for query construction.
  • Centralize query building through well-reviewed data access abstractions or ORM APIs that default to safe parameterization.
  • Apply robust server-side validation and normalization of all externally supplied input, enforcing strict typing and whitelisting where feasible.
  • Limit database privileges for the LimeSurvey application account to the minimum required (least privilege), reducing the blast radius of a successful injection.
  • Consider introducing query-building patterns or frameworks that discourage raw SQL usage except in tightly controlled cases.

How teams detect issues like this

Detection typically combines preventive and detective controls:

  • Use static application security testing (SAST) to flag dynamic SQL construction patterns where user input reaches query strings without parameter binding.
  • During code review, search for direct string concatenation in SQL statements, ad-hoc query builders, and any bypasses around existing data access APIs.
  • Apply security-focused unit and integration tests that attempt invalid and boundary inputs, looking for anomalous database errors or unexpected result sets.
  • Monitor application and database logs for suspicious query patterns (e.g., unexpected UNION, OR 1=1 conditions, or syntax errors originating from user-controllable fields).

Sources

SourceLink
github.comgithub.com/hongancalif/security-advisories/blob/main/CVE-2025-56421.md

Frequently asked

questions

Exploitability depends on which LimeSurvey endpoints are affected and how they are exposed; if vulnerable routes are accessible to anonymous survey participants or internet users, the vulnerability can be remotely exploitable at scale.

Not necessarily. Some SQL injection flaws are reachable without authentication, while others may require a basic user or survey manager account. The critical factor is whether the vulnerable parameters are accessible to the attacker's role.

The most robust fix is to refactor all affected query paths to use parameterized queries or ORM-level parameter binding, ensuring user input is never concatenated into SQL strings.

Adopt secure coding standards mandating parameterized SQL, enforce them with automated checks in CI, restrict direct raw SQL usage, and perform regular security-focused code reviews and testing on data access layers.

Find out what's already
exploitable in your codebase.