Summary
ISPConfig contains an authenticated SQL injection vulnerability in Remote API methods that use the primary_id parameter in database queries. A remote API user with a single low-privilege function permission may be able to alter or delete records and infer sensitive database contents, including password hashes and client data.
Affected context
The vulnerability occurs in ISPConfig deployments where Remote API delete or update methods construct SQL WHERE clauses from the primary_id parameter without reliable integer enforcement or parameterized binding. Risk is higher when an attacker can authenticate as any API user with a permitted low-privilege function and the default SQL injection filtering does not identify the submitted boolean conditions.
Exploit preconditions
- Attack surface: Authenticated ISPConfig Remote API endpoints
- Required access: A valid Remote API account with at least one low-privilege function permission
- Trigger point: The
primary_idparameter processed by affecteddeleteorupdatemethods - Why exploitation is possible: User-controlled input is concatenated into SQL predicates, while filtering may allow quote-free boolean conditions and the request may proceed without effective rejection
Why this happens
The underlying bug is the construction of SQL statements by concatenating request data into WHERE clauses. Because primary_id is not consistently converted to an integer and is not passed through parameterized query binding, an authenticated caller can influence SQL expression evaluation rather than supplying only a record identifier. This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly called SQL injection.
Potential impact
- An attacker may read sensitive database information through blind boolean inference
- Password hashes and client records could be exposed
- Records across tenant boundaries may be modified or deleted
- Database integrity and control-panel availability could be affected
- Compromised data could support further account or infrastructure attacks
General mitigation guidance
Mitigation generally focuses on ensuring that API parameters are treated as data rather than SQL syntax.
Common defensive patterns include:
- Using parameterized queries or prepared statements for every database operation
- Enforcing strict integer conversion and range validation for identifier fields
- Applying authorization checks to each requested record and tenant boundary
- Treating input filters as defense in depth rather than the primary SQL injection control
- Limiting API accounts to the minimum functions and tenant scope required
- Using database identities with narrowly scoped permissions
- Avoiding responses that reveal query-dependent differences where practical
How teams detect issues like this
Organizations can look for:
- Static analysis findings involving string concatenation or interpolation in SQL statements
- Code review signals where request parameters reach query construction without binding
- Tests that submit unexpected identifier types and verify strict rejection
- API gateway or application logs showing repeated boolean-condition variations in identifier parameters
- Database monitoring for unusual cross-tenant reads, updates, or deletes
- Policy checks requiring prepared statements and typed validation for database-bound inputs
Automated application-security and code-review tools may help identify unsafe query construction, but findings should be confirmed against authorization and tenant-isolation behavior.

