Svelte 3.53.0 introduces several notable updates compared to its predecessor, 3.52.0. Key changes reside in the devDependencies section, indicating alterations primarily within the development tooling ecosystem, potentially impacting the build process and developer experience. For instance, acorn sees an upgrade from version 8.4.1 to 8.8.1 incorporating improvements in Javascript parsing. Similarly, kleur, a lightweight terminal coloring library, advances from version 3.0.3 to version 4.1.5, possibly bringing enhanced color support or performance tweaks for build output. A significant upgrade is observed in eslint jumping from version 8.0.0 to 8.26.0, reflecting potential enhancements in code linting rules and overall code quality checks. The agadoo package is updated from 1.1.0 to 2.0.0 which seems to show that there was a breaking change.
Other incremental updates involve packages like @types/aria-query (version 5.0.0 to 5.1.1) and source-map-support (version 0.5.13 to 0.5.21), suggesting refinements in accessibility tooling and source map handling for debugging. Although some packages remain constant, such as rollup, @rollup/plugin-json,@rollup/plugin-typescript this signals stability in core bundling and compilation processes. It's worth noting that @rollup/plugin-node-resolve experienced a version adjustment from 6.0.0 to 11.2.1, hinting at significant changes in module resolution strategies and better compatibility with newer Node.js versions. These updates collectively aim to refine the development workflow, enhance code quality, and ensure compatibility with the evolving JavaScript landscape.
All the vulnerabilities related to the version 3.53.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