Svelte 1.26.0 is a minor update to the "magical disappearing UI framework," building upon the foundation of version 1.25.1. Both versions share the same core development philosophy and retain identical dependencies, suggesting a focus on internal improvements and bug fixes rather than significant feature additions. Developers familiar with 1.25.1 can seamlessly transition to 1.26.0, as the core API and development workflow remain consistent.
The package's description emphasizes its core value proposition: a UI framework that shifts the workload from runtime to compile time, resulting in highly performant and efficient applications. Both versions sport a robust suite of development dependencies, including tools for testing (mocha, nyc, jsdom), linting (eslint), bundling (rollup), and code transformation (babel). This comprehensive tooling ensures a smooth and productive development experience.
While the exact changes between the two versions aren't explicitly detailed in the provided metadata, the update likely addresses minor issues, polishes existing features, or optimizes internal processes. The consistent dependency list indicates that the core focus remains on stability and incremental improvements, making Svelte a reliable choice for developers seeking a performant and developer-friendly UI framework. The update from July 25, 2017 also ensures access to the latest bug fixes and minor enhancements available at that time.
All the vulnerabilities related to the version 1.26.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