Got an email from security team regarding this sql-injection exploit (they will likely post this exploit pretty soon), which I consider high priority, because it can be exploited without even logging into OpenEMR. I also removed the fetching of the password because it is not even used, so no reason to collect it. Please feel free to review it: https://github.com/bradymiller/openemr/commits/security-fix
Thanks Brady. I’d be interested to know how much time they or anyone else has spent looking for vulnerabilities. If not much, then I would expect that quite a few more of these exist.
The concerning thing about the exploit above is that it is in a script that does not require authorization. Probably the first priority on the security walk through should be in scripts that have the following flag in them:
$ignoreAuth=true;