---
title: "NUXT_E2002"
description: "Navigation with dangerous protocol."
canonical_url: "https://nuxt.com/docs/4.x/errors/e2002"
---
# E2002

`navigateTo()` was given a URL using a dangerous protocol (`javascript:`, `data:`, `vbscript:`). Nuxt blocks these to prevent XSS. This almost always means unsanitized user input reached `navigateTo()`.

## Resolution

Validate and sanitize user-provided URLs before navigating. Allow only `http:`, `https:`, or relative paths.

<read-more to="https://nuxt.com/docs/4.x/api/utils/navigate-to">



</read-more>


## Sitemap

See the full [sitemap](https://nuxt.com/sitemap.md) for all pages.
