Svelte version 1.9.1 represents a minor update to the 1.9.0 release of this "magical disappearing UI framework," focusing primarily on patch fixes and very small improvements rather than introducing significant new features. Both versions share the same core dependencies, including magic-string for source code manipulation. The development dependencies are also identical, showcasing a consistent toolchain including rollup for bundling, eslint for code linting, mocha for testing, and various plugins like rollup-plugin-node-resolve and rollup-plugin-commonjs to ensure compatibility with different module systems.
For developers, the key takeaway is stability. The jump from 1.9.0 to 1.9.1 suggests a focus on refining the existing functionality and addressing any bugs or edge cases discovered in the initial 1.9.0 release. While the changelog (not provided here) would detail the specific changes, the unchanged dependency list implies the underlying API and development workflow remain consistent. Developers can likely upgrade from 1.9.0 to 1.9.1 without major code modifications or compatibility concerns. The release dates, just a day apart, further reinforce the nature of 1.9.1 as a quick follow-up to address immediate concerns. If you are starting a new project, using the latest patch version is generally recommended. If you are already using 1.9.0, assess the changelog to see if the fixes addressed in the patch release impact your application, and plan an upgrade accordingly.
All the vulnerabilities related to the version 1.9.1 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