phpGACL database multiple SQL injection vulnerabilities
Multiple SQL injection vulnerabilities exist in phpGACL 3.3.7 because user-supplied parameters are concatenated into SQL queries without sanitisation. An authenticated attacker could send crafted HTTP requests to execute arbitrary SQL, potentially reading or modifying the database.
Originally disclosed on Cisco Talos
Multiple SQL injection vulnerabilities exist in phpGACL 3.3.7. A specially crafted HTTP request can lead to a SQL injection.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application builds SQL queries by concatenating unsanitised request parameters (delete_group, parent_id, group_id) directly into query strings.
Impact
An authenticated attacker could execute arbitrary SQL statements, potentially reading or altering the database, though the CVSS score indicates high confidentiality and integrity impact.
What the attacker needed
Authenticated user account; access to the gacl admin endpoint
The fix
The vendor patched the issue, presumably by sanitising or parameterising the affected inputs.
How it was found
- Authenticate to the OpenEMR instance and obtain a session cookie.
- Send a POST request to the edit_group.php endpoint with action set to Delete and a crafted delete_group parameter.
- Alternatively, send a POST request with action set to Submit and a crafted parent_id or group_id parameter.
- Observe the injected SQL executing, for example via a time delay.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
SQL injection is when a program puts user input directly into a database command, so an attacker can change the command's meaning. Here, several form fields in phpGACL are inserted into SQL without cleaning, letting a logged-in user run their own database queries.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.