Svelte version 1.35.0 arrived just a few days after 1.34.0, marking a quick iteration in the development of this "magical disappearing UI framework." Both versions share the same core philosophy: providing a performant, compiler-based approach to building web applications. This means Svelte shifts the workload from the browser to the build process, resulting in smaller, faster JavaScript bundles.
A quick look at the metadata reveals no changes in the declared dependencies. The core strengths of Svelte remain consistent between these versions. Developers can expect the same excellent developer experience, leveraging tools like Rollup for bundling, ESLint for linting, and TypeScript for optional static typing. The framework continues to lean towards a modern JavaScript ecosystem, with seamless integration of popular tools that facilitate writing clean and maintainable code.
Given the very short gap between releases, the update likely focuses on bug fixes, performance tweaks, or minor internal improvements rather than introducing major new features. This incremental approach is beneficial for developers embracing Svelte, as it translates into stability and reliability. Although the package.json doesn't reveal specific details, developers upgrading from 1.34.0 to 1.35.0 can anticipate a smoother experience and potential optimizations to the compilation process. Always consult the official Svelte changelog for detailed release notes and insights into the precise changes included in each version.
All the vulnerabilities related to the version 1.35.0 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