Svelte version 1.13.6 represents a minor update over its predecessor, 1.13.5, within the early stages of this UI framework's development. Both versions share the same core description: "The magical disappearing UI framework," reflecting Svelte's innovative approach to compiling code into highly optimized vanilla JavaScript at build time, leading to exceptional runtime performance.
Examining the package.json metadata, the primary distinction lies in the releaseDate. Version 1.13.6 was published on April 4th, 2017, while version 1.13.5 was released on April 2nd, 2017. This two-day gap suggests that the newer version likely includes bug fixes, minor improvements, or very targeted enhancements discovered shortly after the release of 1.13.5.
The devDependencies sections are identical, indicating no changes in the tooling or libraries used for development, testing, or building Svelte itself between these versions. This implies that the core focus of the update was on improvements within the Svelte compiler or runtime, rather than modifications to the development environment.
For developers considering Svelte, these versions highlight an active development cycle. While the specific changes introduced in 1.13.6 are not explicitly detailed in the provided data, upgrading from 1.13.5 to 1.13.6 would generally be recommended to benefit from the latest bug fixes and potential performance tweaks. Given the shared dependencies, updating should present minimal compatibility issues. The enduring popularity of Svelte demonstrates its initial promise of a streamlined and performant approach to web development.
All the vulnerabilities related to the version 1.13.6 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