CVE-2026-30881
SQL Injection in Chamilo LMS Statistics Endpoint Enables Data Extraction
Publication date: 2026-03-16
Last updated on: 2026-03-17
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| chamilo | chamilo_lms | to 1.11.36 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-89 | The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-30881 is a SQL Injection vulnerability in Chamilo LMS versions up to 1.11.34. It occurs in the statistics AJAX endpoint where the parameters date_start and date_end from user requests are directly embedded into an SQL query without proper sanitization.
Although the code attempts to escape special characters using Database::escape_string(), this escaping is undone by a subsequent operation that replaces escaped single quotes back to normal single quotes, effectively bypassing the escaping mechanism.
This flaw allows an authenticated attacker with admin privileges to inject arbitrary SQL commands, enabling blind time-based and conditional data extraction from the database.
The vulnerability was patched in version 1.11.36.
How can this vulnerability impact me? :
This vulnerability can have severe impacts as it allows an authenticated attacker to execute arbitrary SQL commands on the database.
Such exploitation can lead to unauthorized data extraction, including sensitive information, data manipulation, or even denial of service by affecting database availability.
Given the CVSS score of 8.8, the impact includes high confidentiality, integrity, and availability risks.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': 'This vulnerability can be detected by testing the statistics AJAX endpoint of Chamilo LMS, specifically by targeting the parameters `date_start` and `date_end` which are vulnerable to SQL injection.'}, {'type': 'paragraph', 'content': 'An authenticated user with admin privileges can attempt to inject SQL payloads into these parameters and observe the response for time delays or conditional responses indicative of blind time-based SQL injection.'}, {'type': 'paragraph', 'content': 'For example, using curl or similar HTTP clients, you can send requests to the vulnerable AJAX endpoint with crafted payloads in the `date_start` or `date_end` parameters to detect injection.'}, {'type': 'list_item', 'content': 'curl -X POST -d "date_start=2026-01-01\' AND SLEEP(5)-- &date_end=2026-01-31" https://your-chamilo-instance/main/inc/ajax/statistics.ajax.php'}, {'type': 'list_item', 'content': 'Observe if the response is delayed by the sleep time, indicating a time-based blind SQL injection vulnerability.'}, {'type': 'paragraph', 'content': 'Note that detection requires authenticated access with sufficient privileges to reach the vulnerable endpoint.'}] [1]
What immediate steps should I take to mitigate this vulnerability?
The immediate and recommended mitigation is to upgrade Chamilo LMS to version 1.11.36 or later, where this SQL injection vulnerability has been patched.
Until the upgrade can be applied, restrict access to the statistics AJAX endpoint to trusted and authenticated admin users only.
Additionally, monitor and audit logs for suspicious activity involving the `date_start` and `date_end` parameters to detect potential exploitation attempts.
Avoid relying solely on input sanitization functions that do not properly escape SQL special characters, as the vulnerability arises from improper neutralization of escaped characters.