I run a small WordPress shop so I’m probably more inclined to defend PHP than the average person. But in my experience 99% of the time when I find an injection vulnerability in a client site it’s because of some old code that was using string concatenation to assemble query strings. This hasn’t been an issue in PHP (PDO) or MySQL ($wpdb->prepare) for a long time. OpenEMR was written in the early 2000s. I’d bet most of these vulnerabilities are in old modules that nobody wants to rewrite. I think the age of the codebase is a more relevant factor than PHP.
It's less about php and keeping what's possible, up to date, before it's too late.
While I'm not a PHP person, I do know there's very capable enterprise level things going on with it like other languages and frameworks.
From the wordpress side, there may be a bit of a reckoning where the shared web hosts haven't kept their setup secure. Most users should find a way to independently backup their websites.
People are just generally bad at writing software. Especially if they aren't trained in it, such as a few tech dabblers who work in health care getting together and deciding they can write an EMR system (not saying that's what happened here). And even if they are trained in it, there's no guarantee they actually practice what they were taught.
Medical records are much more valuable than credit card numbers because you (basically) can’t acquire them legally and the patient has no recourse if they are stolen. You can cancel your credit card, you can’t cancel your medical records.
They can sell the details to insurance companies, the company you work for, or a company you are interviewing for.
Maybe they wanted to hire you, but then saw you were on an antipsychotic. You don't know they have your medical records or psychiatric records, you just got a denial email.
Oh please, that's so delusional and paranoid. Insurance companies aren't going to buy stolen medical records of unknown provenance. This is fraught with legal risks.
For health plans regulated under HIPAA this would likely be straight up illegal, and even if they obtained the data they wouldn't be able to use it because they don't underwrite on that basis. Besides the obvious legal issues, I know from direct firsthand experience that most of the clinical data you can pull out of an EMR is frankly kind of garbage quality anyway. To even try to extract an actuarially useful underwriting signal from it would require building a complex cleansing pipeline. Ain't nobody got time for that.
Life insurance companies can still use non-genetic health data for policy underwriting. But they have simple, legal means of acquiring the data they need by requiring customer disclosures and medical screening exams.
Ransoming the data provider is the goal. The data can have zero intrinsic value, but companies will pay lots of money to bury a breach or prevent disclosure.
> To governments, very valuable. It doesn't take a lot of imagination.
- Have your spy drop some peanut dust in the food of an enemy politician with a peanut allergy.
The typical hacking activity isn't to get people's medical records (which typically have very little value to third parties) but rather to inject ransomware and extort the provider organization.
Most of the recent agentic attacks across US businesses originate from Chinese state aligned groups leveraging ARTEX. They don't need your money; they want information.
They're also likely trying to be punitive because I'm sure Claude and OpenAI models are slamming them.
I think you're mixing up different concepts. OpenEMR instances would typically be deployed behind firewalls (and possibly API gateways as well), although it's possible that some incompetent organizations have deployed production instances without any protection. A VPN might then be provisioned for trusted users or business partners to pass certain traffic through the firewall.
about 6-12 months ago I rewrote all of my PHP legacy code bases in Rust and it only took Claude code a couple days to do all of it but I'm not saying that that's a good or bad idea but it's just something that I did to mitigate any of the future problems and also at least from what I've seen the performance is about 20 times faster than PHP.... another thing is the way that it's actually done especially when you're talking about large code bases is you kind of have to go file by file and create a parity of functionality line by line from PHP to rust file by file and then from that you can reliably convert a whole code base.... trying to do it any other way results in a lot of hallucinations...fyi
Any idea how much code and how much it cost? I'm tempted to volunteer my account to at least rip through the existing code and look for any easy bugs to fix. Not hands on enough to write rust myself but I'm open to helping.
I just used the $20 a month plan with opus and it was pretty good and it went through 300k line of codebase in about 2 weeks initially and then another two weeks to actually nail down 100% compatibility between both systems with unit testing to confirm that.... there was a smaller code base that only took a few days to rewrite and test.... today I'd probably use deepseek-v4.1-flash to do the same thing because I use that model to make enhancements to the same trees everyday
Used to do IT management for a medical practice. EMR software architecture is universally horrendous. Would suspect many other vendors are in line to be pwned as well.
The CVEs are real issues but need authentication. The article indicates that the author installed OpenEMR with default credentials admin:pass on his own box, saw a successful attack, but proceeded to allow the box to be used by the attacker for "hosted their own payload delivery infrastructure" (admittedly, this may have been for a short period of time, but the article doesn't say that). I'm unconvinced that this activity by a private "research team" is part of the solution rather than largely just part of the problem.
I know some orgs using it during humanitarian missions. What do you suggest they use instead? FEMR, whose website is currently taken over by malvertising?
dhis2 is also dealing with sql injections and XSS, according to their advisories page [0], and it requires online access. Wasn't familiar with openmrs though, looks interesting.
I'd also add network ingress. An OpenEMR instance may not be particularly compelling as something that can be directly exploited for cash, but if it lives in a network with access to other interesting systems (databases, payment processing systems, etc) it can become a handy link in the exploit chain to enable a repeatable and profitable attack.
You ever gone to the hospital in the US? You get random bills for $700 for months after. Very difficult and time consuming to determine if Dr. So-and-so really did interpret your blood panel and if they really are out of network.
You paid for the ambulance ride, right? Did you pay for the contractor paramedic and the supplies?
You could milk that for many thousands of dollars per patient assuming that they can pay.
It's wild that hospitals are allowed to bill in piecemeal. They really need to make a law that all departments and credentialed providers need to centrally bill through the hospital. The first thing on my credit score at age 18 was a derogatory mark for non-payment of a lab bill from an ER visit at an out of state hospital. Never received the lab bill. No phone calls, emails, or letters. Only found it from collections getting a hold of me. Too young to know how to fight it and it set me up for failure for years, credit wise.
There's a reason why SQL injections are consistently in the OWASP top 10. Even with a well governed project, mistakes happen. Add to this that not every project has the budget for a static analysis tool (Semgrep, CodeQL, etc) and the volume of AI generated changes and you have a perfect storm of software defects to keep the classic vulnerabilities alive and well.
Even the free static analysis tools have been pretty good at catching SQL injection vulnerabilities for years now. There is no plausible excuse for this type of mistake.
> Even with a well governed project, mistakes happen.
A well governed project would structurally eliminate this class of bugs. Especially in 2026, even stupid AI can detect the use of non-static query strings. If you use a sane language like Rust even the compiler can enforce this. You don't need any separate static analysis tools. Python, C++ and even Go can do this too (although sadly its default SQL library doesn't).
"Mistakes happen" is not an excuse in this case.
> not every project has the budget for a static analysis tool (Semgrep, CodeQL, etc)
Both of those are free for open source projects! If you're putting a freaking medical records platform out there without even basic free security checking, I would say that is shockingly irresponsible.
A huge number of risks (not all, but most often cited) are due to risks that are imposed on unjust systems, either discrimination due to preexisting conditions for insurance or otherwise.
I don't want my medical details publicly accessible, but the reasons I don't want that is because it will be abused by entities that profit from acting disingenuously against me.
LLMs should find (and be able to remediate) SQL injection in PHP very easily, I would think. Not really any excuse for it not getting done.
While I'm not a PHP person, I do know there's very capable enterprise level things going on with it like other languages and frameworks.
From the wordpress side, there may be a bit of a reckoning where the shared web hosts haven't kept their setup secure. Most users should find a way to independently backup their websites.
If only we had a technology that could read those old modules and rewrite them using modern coding standards and up to date libraries. Shucks...
We have seen a large uptick in them compromising patient discount card sites, which are often run by non-profits that help patients find aid.
They implant malware that swaps the pages to make them PAY for the free discount card, and if you go directly to the site it doesn't activate.
We've had multiple call center reps call our help desk because they are trying to help a patient then get asked to enter credit card details.
Maybe they wanted to hire you, but then saw you were on an antipsychotic. You don't know they have your medical records or psychiatric records, you just got a denial email.
For health plans regulated under HIPAA this would likely be straight up illegal, and even if they obtained the data they wouldn't be able to use it because they don't underwrite on that basis. Besides the obvious legal issues, I know from direct firsthand experience that most of the clinical data you can pull out of an EMR is frankly kind of garbage quality anyway. To even try to extract an actuarially useful underwriting signal from it would require building a complex cleansing pipeline. Ain't nobody got time for that.
Life insurance companies can still use non-genetic health data for policy underwriting. But they have simple, legal means of acquiring the data they need by requiring customer disclosures and medical screening exams.
https://www.npr.org/sections/health-shots/2018/07/17/6294415...
https://www.fiercehealthcare.com/payer/quest-for-identified-...
This has been happening for a very long time.
Third party data brokers vacuum up the data from whoever they can get it from, and then companies buy bulk data services and claim ignorance.
Ransoming the data provider is the goal. The data can have zero intrinsic value, but companies will pay lots of money to bury a breach or prevent disclosure.
To J. Random Hacker, none?
To governments, very valuable. It doesn't take a lot of imagination.
- Have your spy drop some peanut dust in the food of an enemy politician with a peanut allergy.
- "Hey, soldier. Hide this little box on your military base and we'll pay for your wife's cancer treatment."
This is way too much imagination.
more generally being in the hospital is a vulnerable position itself, so they are heavily guarded for that reason
You must not read the news.
https://en.wikipedia.org/wiki/Poisoning_of_Alexander_Litvine...
They're also likely trying to be punitive because I'm sure Claude and OpenAI models are slamming them.
>237 (Public) advisories
Any user clinic or hospital or whatever should be charged with malpractice for using this software. Using this software is a choice.
https://github.com/medplum
[0] https://github.com/dhis2/dhis2-core/security/advisories
You have not seen horrors until youve seen ".awk scripts thousands of lines long operating as cgi under apache".
But tbh the move is probably to syphon up anything with any perceived value and see who might buy it.
You paid for the ambulance ride, right? Did you pay for the contractor paramedic and the supplies?
You could milk that for many thousands of dollars per patient assuming that they can pay.
Let me guess it's written in Python or PHP or something.
Edit: PHP lol
A well governed project would structurally eliminate this class of bugs. Especially in 2026, even stupid AI can detect the use of non-static query strings. If you use a sane language like Rust even the compiler can enforce this. You don't need any separate static analysis tools. Python, C++ and even Go can do this too (although sadly its default SQL library doesn't).
"Mistakes happen" is not an excuse in this case.
> not every project has the budget for a static analysis tool (Semgrep, CodeQL, etc)
Both of those are free for open source projects! If you're putting a freaking medical records platform out there without even basic free security checking, I would say that is shockingly irresponsible.
[0] https://github.com/openemr/openemr/commits/master/semgrep.ya...
I don't want my medical details publicly accessible, but the reasons I don't want that is because it will be abused by entities that profit from acting disingenuously against me.