Svelte version 1.60.2 is a minor patch release of the popular "magical disappearing UI framework," building upon the foundation established in version 1.60.1. Although the core description remains the same, indicating no fundamental shift in the framework's core philosophy, examining the metadata reveals subtle yet significant differences.
Both versions share identical development dependencies, suggesting that the tooling and build process used by the Svelte team remain consistent. This indicates a stable and reliable development environment, which is reassuring for developers relying on Svelte for their projects.
The most notable difference resides in the dist section. While both versions contain 11 files in the distributed package, the unpacked size of 1.60.2 is slightly larger at 2358601 bytes, compared to 1.60.1's 2354368 bytes. This ~4KB increase, likely from bug fixes or minor feature refinements, showcases the continuous efforts to optimize and improve the framework, even in patch releases.
The release dates further highlight the rapid pace of Svelte's development. Version 1.60.2 was published on April 4, 2018, just a day after 1.60.1 (April 3, 2018). This quick turnaround suggests that the fix, or addition, was important enough to warrant immediate deployment.
For developers, this signifies that while the changes might not be groundbreaking, staying up-to-date is still beneficial. This dedication to continuous improvement ensures a more polished experience, addressing potential issues and enhancing the runtime performance.
All the vulnerabilities related to the version 1.60.2 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