> If you compare it with production languages, PHP looks pretty weak.
8f your comparison excludes all the vulnerabilities they come with, sure.
In practice no one using Node is using it without npm. Same for every other language that has insane transitive dependencies for any non-trivial project.
PHP is no more vulnerable than those languages.