Svelte version 3.24.1 represents a subtle yet important update to the popular UI framework, following closely on the heels of version 3.24.0. Both versions share the core features that define Svelte: a cybernetically enhanced approach to web app development, emphasizing performance and developer experience. The listed devDependencies remain identical, indicating no substantial changes in the tooling or build process between these releases. Developers can expect the same efficient compilation, robust testing environment, and comprehensive linting setup in both versions.
The key difference lies in the internal improvements and potentially bug fixes that differentiate 3.24.1 from its predecessor. While the package dependencies remain consistent, the increase in unpackedSize to 3184007 bytes (from 3174852) hints at code modifications or additions within the core Svelte library itself. The release date, nearly a month after 3.24.0, suggests that 3.24.1 addresses issues discovered in the earlier version or introduces minor enhancements. For developers using Svelte, upgrading to 3.24.1 is recommended. While the dependencies are the same, the file difference suggests that it contains potential bug fixes tested for about a month. This ensures they benefit from the latest stability improvements and optimizations Svelte has to offer, further enhancing their web development projects.
All the vulnerabilities related to the version 3.24.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