Svelte version 3.58.0 introduces incremental improvements over its predecessor, version 3.57.0, continuing to refine the developer experience and optimize the performance of this cybernetically enhanced web app framework. While the core functionality remains consistent, several key differences highlight the ongoing evolution of the library. The unpacked size of 3.58.0 is slightly larger than 3.57.0 10558502 vs 10028427 and also the file count is bigger (259 vs 250) hinting at some internal additions, refactoring, or updates of helper functions and assets to better support the compilation process.
Delving into the dependencies, both versions share an extensive list of development dependencies, crucial for testing, linting and building Svelte components, with one difference in the release date and the dist information which suggest improvements and bug fixes have been made. This robust set of tools ensures code quality, maintainability, and compatibility across different environments. Developers leveraging Svelte can benefit from these tools, ensuring a smooth development workflow and catching potential errors early in the process.
Finally version 3.58.0 was released on March 30th 2023, while 3.57.0 was released on March 15th 2023. Staying up-to-date with the latest minor versions, like 3.58.0, allows developers to take advantage of the continuous improvements and ensure their projects are built with the most optimized and reliable version of the framework. Svelte's commitment to developer experience and performance makes it a compelling choice for building modern web applications.
All the vulnerabilities related to the version 3.58.0 of the package
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