Skip to content

fix: incomplete URL scheme check code scanning alert - #16392

Merged
Rich-Harris merged 4 commits into
version-3from
alert-autofix-33
Jul 17, 2026
Merged

fix: incomplete URL scheme check code scanning alert#16392
Rich-Harris merged 4 commits into
version-3from
alert-autofix-33

Conversation

@teemingc

@teemingc teemingc commented Jul 17, 2026

Copy link
Copy Markdown
Member

fix for https://github.com/sveltejs/kit/security/code-scanning/33

We don't care about the vbscript: protocol since that only works on internet explorer. I've also tested running it on Safari/Firefox/Chrome and it's not recognised.

data: on the other hand does allow running some arbitrary javascript:

data:text/html,%3Cscript%3Ealert%28%27hi%27%29%3B%3C%2Fscript%3E

An HTML document with <script>alert('hi');</script> that executes a JavaScript alert. Note that the closing script tag is required.

Taken from https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data#datatexthtml3cscript3ealert2827hi27293b3c2fscript3e

…heck

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@pkg-svelte-dev

pkg-svelte-dev Bot commented Jul 17, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from d0f8165:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/d0f81658b096a062ca2f69f0c426120fd17028cd

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16392

@changeset-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f3ee810

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@teemingc
teemingc marked this pull request as ready for review July 17, 2026 15:41
@teemingc teemingc changed the title Potential fix for code scanning alert no. 33: Incomplete URL scheme check fix: Incomplete URL scheme check Jul 17, 2026
@teemingc teemingc changed the title fix: Incomplete URL scheme check fix: incomplete URL scheme check Jul 17, 2026
@teemingc teemingc changed the title fix: incomplete URL scheme check fix: incomplete URL scheme check code scanning alert Jul 17, 2026
@Rich-Harris
Rich-Harris merged commit 6ef811d into version-3 Jul 17, 2026
20 of 21 checks passed
@Rich-Harris
Rich-Harris deleted the alert-autofix-33 branch July 17, 2026 16:42
teemingc pushed a commit that referenced this pull request Jul 18, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to version-3, this PR
will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`version-3` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `version-3`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @sveltejs/kit@3.0.0-next.10

### Major Changes

- breaking: move `defineEnvVars` to `@sveltejs/kit/env`
([#16375](#16375))

### Patch Changes

- fix: treat `data:` protocol URLs as external for redirect
([#16392](#16392))

- perf: skip import graph collection outside client environments
([#16383](#16383))

- fix: warn if there are plugins using `transformIndexHtml`
([#16394](#16394))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants