Skip to content
CSRF Advisory Intermediate CVE-2020-13569

OpenEMR GACL cross-site request forgery vulnerability

The GACL pages in OpenEMR lack CSRF protection, allowing an attacker to make a logged-in admin perform unintended actions. By combining this with SQL injection or XSS flaws in phpGACL, an attacker could steal admin credentials or execute arbitrary database queries.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A cross-site request forgery vulnerability exists in the GACL functionality of OpenEMR 5.0.2 and development version 6.0.0 (commit babec93f600ff1394f91ccd512bcad85832eb6ce). A specially crafted HTTP request can lead to the execution of arbitrary requests in the context of the victim.

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

The phpGACL pages in OpenEMR do not verify a CSRF token, unlike other OpenEMR pages.

Impact

An attacker could steal OpenEMR administrator credentials and execute arbitrary queries in the underlying database, though session stealing would be prevented if the httpOnly flag were set.

What the attacker needed

Victim is an OpenEMR admin; victim visits attacker's page or link; attacker knows OpenEMR URL

The fix

The report does not state a fix, but CSRF tokens should be added to all phpGACL pages, and the httpOnly flag should be set on session cookies.

How it was found

  1. An attacker sets up a malicious webpage containing JavaScript that sends a POST request to the GACL endpoint.
  2. The attacker directs an OpenEMR admin to visit that page.
  3. The admin's browser sends the request with the admin's session cookie, exploiting a SQL injection or XSS flaw.

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.

Cross-site request forgery (CSRF) is when a malicious website tricks a logged-in user's browser into sending a request to another site where the user is authenticated. Here, the GACL pages did not check for a secret token that proves the request came from the legitimate site, so an attacker could make an admin's browser send commands to OpenEMR without the admin's knowledge.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

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.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.