Web engineering

OWASP-Oriented Security for Vue and Nuxt Single-Page Apps

Practical OWASP-aligned practices for securing Vue and Nuxt apps—XSS, auth, CSP, and third-party risk without security theater.

RunProf Development Team · 1 min read
OWASP-Oriented Security for Vue and Nuxt Single-Page Apps

SPAs shift risk to the browser and to API boundaries. Cross-site scripting still tops the list: never trust HTML from users or third parties without sanitization, and prefer framework defaults for binding over raw `v-html`. Content Security Policy is not optional for production—tighten it iteratively and monitor violations in staging before you block legitimate traffic.

Authentication needs clear rules. Store tokens with httpOnly cookies when possible, rotate refresh tokens, and avoid localStorage for high-value secrets. For Nuxt, align server middleware and API routes so authorization is enforced server-side—client-side guards improve UX but never replace real checks.

Third-party scripts and analytics are supply-chain risk: subresource integrity where applicable, least privilege on API keys in the client, and regular dependency audits. Threat modeling does not need a slide deck—start with data flows from user input to persistence, and test the edges with burp suites or OWASP ASVS-style checklists tailored to your app.

About the author

RunProf Development Team

The RunProf team of engineers and designers in Alexandria and Riyadh. We write about what we learn while building apps, websites and systems for clients in 12 countries.

Share this article

Need a team to put this into practice?

We turn ideas like these into shipped products for our clients every day.

Start a project