Svelte 3.56.0 represents a refinement over version 3.55.1, offering enhancements to this popular JavaScript compiler that transforms your code into highly efficient Vanilla JavaScript. Key upgrades are visible in the development dependencies, signaling improvements in the tooling and build process. For instance, considerable bump of @typescript-eslint/parser and @typescript-eslint/eslint-plugin from version 5.22.0 to 5.29.0, suggesting enhanced TypeScript support and potentially better static analysis during development. Similarly, the update of @rollup/plugin-json from 4.0.1 to 6.0.0 indicates improvements in handling JSON files within the build pipeline, possibly related to performance or feature additions. The upgrade of eslint from 8.26.0 to 8.35.0 shows that the code base is following modern standards and incorporating new features. The version of agadoo also saw an increase, suggesting an improvement in this package. The bump of magic-string to version 0.30.0 could signify better code manipulation capabilities, useful for Svelte's compilation process. Library also contains size improvements: unpackedSize increased by ~200kb and fileCount has 1 more file.
Developers should note these changes as they often correlate with bug fixes, performance optimizations, and the adoption of newer language features or best practices. While the core functionality of Svelte remains consistent, these dependency updates contribute to a more robust and streamlined development experience, improving the efficiency and reliability of Svelte applications.
All the vulnerabilities related to the version 3.56.0 of the package
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