Svelte 3.5.4 offers subtle improvements over its predecessor, version 3.5.3, in the realm of cybernetically enhanced web app development. While the core functionality remains consistent, the updated version demonstrates refinements in its distribution package. Most notably, the dist object reveals a slight increase in fileCount from 190 to 191, alongside a modest increase in unpackedSize from 2777995 bytes to 2780322 bytes. This suggests the addition of a new file or minor adjustments to existing ones within the package, potentially addressing bug fixes or optimization enhancements.
Both versions share identical dependencies and development dependencies, indicating stability in the underlying toolchain. Developers leveraging Svelte can expect a familiar development experience, utilizing the same suite of tools like Rollup, TypeScript, and ESLint for building and maintaining their applications. The release date of Svelte 3.5.4, June 23, 2019, positions it as a mature and well-established option. These seemingly small changes of version 3.5.4 indicate a commitment to continuous improvement and refinement, offering developers a slightly more polished and optimized experience when building reactive web applications with Svelte. The MIT license ensures developers can freely use and modify Svelte in their projects. Despite the incremental nature of this update, it underscores Svelte's ongoing evolution and commitment to providing a robust and efficient framework.
All the vulnerabilities related to the version 3.5.4 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