> you don't seem to have any understanding what SPAs are. There is no server-side code in your SPA, all code is run on the users browser. If you do any sort of DoS, you will bring down the users browser, not the server hosting the SPA. How is that a feasible attack vector?
You don't think it is a problem if user's browsers lock up or crash? You don't think it reflects poorly on a business if their app/SPA is the one that caused it? (Even though it wasn't their bug?)
The first D in DDoS is distributed and sure the most common meaning of that is taking down a remote server with lots of broken clients. This form in SPAs is also distributed in the additional way that it can vector to take down many clients.
> Again, not SPA relevant. What is injected? How do you even inject that code into the browser of a user, if you do not have access to the server-side end of the application? XSS, as I said, is mostly mitigated in SPAs that use CSP.
Query Injection attacks like SQL Injection attacks are about putting attacker-specified changes into whatever Query Language is being used. Many SPAs move their generation of queries and the Query Languages they use into the SPA. That's the entire point of libraries like react-query, moving query generation into DSLs close to the UI and directly inside the SPA. No CSP is going to ever stop a SPA from sending bad queries to open query services. Sure XSS is mostly mitigated, but XSS is not the only way to inject a query. The SPA is in the hands of the users. If your attackers are users (or pretending to be) they don't need XSS, they just need access to the application and its query DSLs. Bugs in those query DSLs are security bugs.
Classic Client/Server architecture 101: the client is in the hands of the enemy.