/

CVE-2025-50192

Severity:

CRITICAL RISK

(9.8)

SQL Injection in Chamilo Web Service Registration Endpoint

CVE-2025-50192

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Database Compromise and Potential Full Application Takeover

Severity:

CRITICAL RISK

(9.8)

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 time-based SQL injection vulnerability in Chamilo's /main/webservices/registration.soap.php endpoint allows attackers to manipulate database queries via crafted input parameters.

When exposed to untrusted clients, this can enable data extraction, modification, or full compromise of the underlying database supporting the learning management system.

Affected context

This vulnerability occurs in Chamilo deployments that expose the SOAP-based registration web service at /main/webservices/registration.soap.php to users or external integrations.

It is relevant when request parameters are built into SQL queries without robust validation or parameterization.

The risk is elevated in environments where this endpoint is reachable from the internet or from untrusted internal clients and the application account has broad database privileges.

Exploit preconditions

  • Attack surface: HTTP/S access to the /main/webservices/registration.soap.php endpoint (typically via SOAP requests).
  • Required access: Ability to send crafted web service requests; no special privileges are assumed beyond connectivity to the endpoint.
  • Trigger point: Injection of malicious data into parameters that are incorporated into SQL statements executed by the registration service.
  • Why exploitation is possible: User-controlled values are concatenated into SQL queries without using safe parameter binding or strict input handling, enabling attackers to alter query logic and infer results through timing differences.

Why this happens

The underlying bug class is classic SQL injection: user-supplied input is directly embedded into SQL statements.

Instead of using prepared statements or parameterized queries, the code in the registration SOAP endpoint likely constructs raw SQL strings by concatenating request parameters.

This aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where metacharacters such as quotes, operators, or control keywords are not neutralized.

In the time-based variant, attackers exploit database functions that deliberately delay responses to infer information based on response timing rather than direct error messages or returned data.

Potential impact

  • Extraction of sensitive learner, instructor, and course data from the database.
  • Tampering with course content, user registrations, grades, or access control data.
  • Creation, elevation, or deletion of user accounts, potentially leading to administrator takeover.
  • Destruction or corruption of database tables, impacting system availability and integrity.
  • Use of the database access as a stepping stone to compromise the underlying host or other connected systems, depending on configuration.

General mitigation guidance

Effective mitigation focuses on eliminating direct string concatenation of SQL and reducing the trust placed in inbound service parameters.

Recommended patterns include:

  • Using parameterized queries or prepared statements for all database access in the registration web service and similar endpoints.
  • Introducing a data-access layer that centralizes and enforces safe query construction.
  • Applying strict input validation and canonicalization on web service parameters, enforcing expected types, lengths, and formats.
  • Restricting database privileges of the application account to the minimal set required, limiting the blast radius of a successful injection.
  • Implementing centralized error handling to avoid leaking database details and to standardize responses to anomalous requests.

By defaulting to safe query APIs and least-privilege database roles, similar injection opportunities can be significantly reduced.

How teams detect issues like this

Organizations can detect SQL injection risks in this and similar endpoints through:

  • Static analysis: Rules that flag dynamic SQL creation using string concatenation or interpolation with user input in PHP scripts, particularly in web service handlers.
  • Code review: Manual checks focusing on database access patterns in web service controllers and authentication/registration logic, verifying that queries use bound parameters and validated inputs.
  • Dynamic testing: Security scanning and fuzzing of SOAP endpoints to observe response time anomalies indicative of time-based SQL injection behavior.
  • Runtime monitoring: Database and application logs configured to alert on unusual query patterns, unexpected delays, or repeated requests with anomalous parameter values.
  • Policy enforcement: CI/CD gates that reject changes introducing raw SQL construction in request-handling paths in favor of standardized query abstraction layers.

Sources

SourceLink
github.comgithub.com/chamilo/chamilo-lms/commit/fd0f2a95b21fa28da47d785c88b879a77951b0f7
github.comgithub.com/chamilo/chamilo-lms/releases/tag/v1.11.30
github.comgithub.com/chamilo/chamilo-lms/security/advisories/GHSA-g389-qq92-qxxf

Frequently asked

questions

Yes, if the /main/webservices/registration.soap.php endpoint is reachable from external or untrusted networks, an attacker can attempt exploitation remotely via crafted SOAP or HTTP requests.

The attacker typically only needs network access to the vulnerable web service. No valid user account may be required if the endpoint accepts unauthenticated requests, though specific deployment configurations can change this.

The safest approach is to refactor all affected database interactions to use parameterized queries or prepared statements exclusively, removing any direct concatenation of user input into SQL strings. Coupling this with strict input validation and least-privilege database roles provides a robust fix pattern.

Prevention hinges on adopting secure coding standards for data access, including mandatory use of query parameterization, automated static checks for dynamic SQL, thorough security reviews of web service endpoints, and regular penetration testing focused on input handling and data-access boundaries.

Find out what's already
exploitable in your codebase.