Skip to content
SQL injection Advisory Intermediate CVE-2020-13566CVE-2020-13568

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.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 8.8 View original

Multiple SQL injection vulnerabilities exist in phpGACL 3.3.7. A specially crafted HTTP request can lead to a SQL injection.

Claudio Bozzato, on Cisco Talos

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

  1. Authenticate to the OpenEMR instance and obtain a session cookie.
  2. Send a POST request to the edit_group.php endpoint with action set to Delete and a crafted delete_group parameter.
  3. Alternatively, send a POST request with action set to Submit and a crafted parent_id or group_id parameter.
  4. 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.

More by Claudio Bozzato

View all

185 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.