Svelte version 1.11.3 is a minor patch release over the previous stable version 1.11.2, both maintaining the core philosophy of a "magical disappearing UI framework." Developers familiar with Svelte will find the transition seamless, as the API and core functionality remain consistent. Both versions share the same primary dependency, magic-string, indicating continued reliance on this library for efficient string manipulation during compilation.
The key distinction lies in the release date, with 1.11.3 being released on March 15, 2017, a few days after 1.11.2 (March 10, 2017). This suggests that version 1.11.3 likely contains bug fixes or minor improvements implemented in the short interval between releases. While the specific nature of these fixes isn't explicit, users of Svelte 1.11.2 are encouraged to upgrade to 1.11.3 to benefit from any potential stability enhancements or performance optimizations.
Developers investing in Svelte can expect a consistent development experience, supported by a comprehensive suite of development dependencies, including tools for testing (mocha, nyc, jsdom), linting (eslint), bundling (rollup), and code coverage (codecov). These tools ensure code quality and facilitate a robust development workflow. Packages such as css-tree for CSS processing, as well as various Babel plugins for ES2015 transformations, highlight Svelte's commitment to modern JavaScript standards, while maintaining broad browser compatibility.
All the vulnerabilities related to the version 1.11.3 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