Svelte 3.6.5 introduces subtle yet impactful improvements over its predecessor, version 3.6.4, offering developers an enhanced experience in building cybernetically enhanced web applications. While the core description remains the same, reflecting Svelte's ongoing commitment to its foundational principles, several key dependency updates signify notable changes.
The jump from c8 v3.4.0 to v5.0.1 suggests improvements in code coverage reporting, potentially contributing to more robust testing and confidence in the codebase. Rollup, a crucial bundler, sees an upgrade from v1.1.2 to v1.16.6, likely incorporating bug fixes, performance enhancements, and new features that streamline the build process. TypeScript evolves from v3.4.0 to v3.5.2, providing access to new language features, potentially stricter type checking, and improved developer tooling. Furthermore, the update from rollup-plugin-typescript v1.0.0 to v1.0.1 likely addresses compatibility issues or minor enhancements specifically relevant to TypeScript integration within the Svelte build pipeline. Node.js target jumps from version 8 to version 12.
These dependency upgrades collectively suggest a focus on stability, performance, and developer experience. While the changes may not be immediately apparent in the Svelte component syntax or core functionality, they contribute to a more refined and efficient development workflow, enabling developers to build and maintain Svelte applications with greater ease and confidence. The increased file count 241->240 and slightly bigger unpacked size also are indicators of changes in the codebase.
All the vulnerabilities related to the version 3.6.5 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