Svelte version 3.53.1 represents a minor update over its predecessor, 3.53.0, bringing incremental improvements relevant to developers using this cybernetically enhanced web app framework. While the core description remains consistent, focusing on building efficient and performant web applications, the underlying changes introduce subtle yet potentially impactful differences.
A key distinction lies in the updated dependencies. Version 3.53.1 upgrades tslib from version 2.4.0 to 2.4.1 and includes a new devDependency util at version ^0.12.5. While tslib provides helper functions for TypeScript, ensuring better compatibility and potentially resolving minor bugs, the impact of util being added as a devDependency is less immediately obvious but may improve the internal tooling.
Furthermore, the dist object reveals differences in the package size. Version 3.53.1 has a slightly larger unpacked size of 9667546 bytes compared to 3.53.0's 9477740 bytes. This increase, albeit small, can be attributed to the updated and new dependencies and potential internal code adjustments. The release date also shows version 3.53.1 was released a day after, on 2022-11-10T14:19:13.121Z.
For developers, these subtle changes indicate an effort to refine the Svelte development experience and ensure compatibility. While the core functionality remains largely the same, updating to 3.53.1 might offer improved stability and potential performance enhancements through the updated dependencies.
All the vulnerabilities related to the version 3.53.1 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