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.
> old modules that nobody wants to rewrite
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...
Agree, it's not PHP, it's strings concatenated into a query. Any language could theoretically do this.
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.