Svelte 1.10.1 is a minor patch release following closely on the heels of Svelte 1.10.0, both versions touting themselves as "the magical disappearing UI framework". For developers, this means a focus on performance and a streamlined development experience, where the framework handles the heavy lifting of UI updates with minimal overhead. Both versions share identical dependency structures, relying on tools like magic-string for efficient code manipulation and a suite of development dependencies for testing, linting, and bundling. These include rollup for module bundling, eslint for code quality, and mocha for testing. No changes are detected in what concerns dependencies meaning upgrading from 1.10.0 to 1.10.1 should be straightforward with no breaking changes.
The key difference lies in the release date, with 1.10.1 being released two days after 1.10.0. This suggests that 1.10.1 contains bug fixes or very minor enhancements that were deemed necessary shortly after the initial 1.10.0 release. Developers should consider upgrading to 1.10.1 to benefit from the latest stability improvements. Because it is a patch version, upgrading comes risk free. While the core functionalities and dependencies remain consistent between these versions, the subtle refinements in 1.10.1 contribute to a more robust and reliable Svelte development experience.
All the vulnerabilities related to the version 1.10.1 of the package
Svelte vulnerable to XSS when using objects during server-side rendering
The package svelte before 3.49.0 is vulnerable to Cross-site Scripting (XSS) due to improper input sanitization and to improper escape of attributes when using objects during SSR (Server-Side Rendering). Exploiting this vulnerability is possible via objects with a custom toString() function.
Svelte has a potential mXSS vulnerability due to improper HTML escaping
A potential XSS vulnerability exists in Svelte for versions prior to 4.2.19.
Svelte improperly escapes HTML on server-side rendering. It converts strings according to the following rules:
"
-> "
&
-> &
<
-> <
&
-> &
The assumption is that attributes will always stay as such, but in some situation the final DOM tree rendered on browsers is different from what Svelte expects on server-side rendering. This may be leveraged to perform XSS attacks. More specifically, this can occur when injecting malicious content into an attribute within a <noscript>
tag.
A vulnerable page (+page.svelte
):
<script>
import { page } from "$app/stores"
// user input
let href = $page.url.searchParams.get("href") ?? "https://example.com";
</script>
<noscript>
<a href={href}>test</a>
</noscript>
If a user accesses the following URL,
http://localhost:4173/?href=</noscript><script>alert(123)</script>
then, alert(123)
will be executed.
XSS, when using an attribute within a noscript tag