In the early 2000s, everyone in my bubble knew that PHP was a security nightmare, only seconded by Flash. In the meantime, Adobe gave up on Flash, but PHP is still alive and rocking.
How did that happen? Did PHP get some serious makeover? Do developers just not care?
Have you ever seen how shared hosting works for some of the languages you mentioned? For Node for instance it’s the same as PHP, you upload an index.js and that’s it.