Menu

SPA Shell Only vs Shell Plus API: Where Should XSS Protection Sit?
📰

SPA Shell Only vs Shell Plus API: Where Should XSS Protection Sit?

DEV Community: appsec·禾·10 days ago
#zjuC3yGz
#devtoappsec#devto#dev#application#safeline
Long article (941 words) — no AI summary yet.
Reading 0:00
15s threshold

A single page application can load through a protected hostname while its most dangerous input reaches an unprotected API. That placement gap matters when automated attackers probe search parameters, profile fields, support tickets, and other writable content for cross-site scripting (XSS).

For a security owner investigating how to stop cross site scripting in a single page application, the first decision is which requests actually pass through the security control. Compare two choices: protecting only the hostname serving the SPA shell, or also protecting the API endpoints that accept and return application data.

The attack path to investigate

Consider a hypothetical customer portal. The browser loads its HTML and JavaScript from portal.example.com , then reads and writes records through api.example.com . An attacker submits markup into a profile description. The API stores that value, and an employee later opens the profile in the SPA.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.