Svelte 漏洞与安全更新
15 条
11月16日周一
SvelteKit: Build-time server-only module import guard could fail, resulting in server secrets being statically replaced in client bundle
受影响: npm:@sveltejs/kit >= 3.0.0, <= 3.1.0 → 3.1.1 Under certain circumstances, server-only imports, which typically cannot be included in the client bundle, could make their way into it, potentially exposing secrets. This could only occur when those server-only imports were made through src/params.js.
SvelteKit: DoS while parsing form data from a remote functions `form`
受影响: npm:@sveltejs/kit >= 2.42.0, <= 3.1.0 → 3.1.1 This only affects applications using the experimental remote functions flag and utilizing the form, query, or command remote functions. A specially-crafted request could block the event loop for extended periods of time during parsing.
SvelteKit: Private `query.batch` functions could collide, producing unexpected parameter / function combinations
受影响: npm:@sveltejs/kit >= 2.60.1, <= 3.1.0 → 3.1.1 Under certain circumstances, private (non-exported) query.batch functions could end up sharing a batch, resulting in the arguments from one function being passed to another. This only affects apps using the experimental remote functions flag and non-exported query.batch functions.
SvelteKit: Protocol-relative module import during server-side route resolution allows cross-origin script execution
受影响: npm:@sveltejs/kit >= 3.0.0, < 3.1.1 → 3.1.1, npm:@sveltejs/kit < 2.70.4 → 2.70.4 If an attacker could, using some form of social engineering or other exploit, get a user to use client-side navigation to navigate to a specially-crafted link, the attacker could cause code from another domain to be imported and run on the user's machine. This only affected apps with router.resolution: 'server'.
11月14日周六
SvelteKit: adapter-node crashes with an unhandled URIError when `reroute` rewrites malformed pathnames
受影响: npm:@sveltejs/kit >= 3.0.0, < 3.1.1 → 3.1.1, npm:@sveltejs/kit < 2.70.4 → 2.70.4 When reroute turned an invalid percent-encoded path into a valid path, it could potentially trigger a comparison that would crash the server.
SvelteKit: Prerendered paths are interpreted as regular expressions in Vercel route config generated by @sveltejs/adapter-vercel and @sveltejs/adapter-static
受影响: npm:@sveltejs/adapter-vercel < 6.3.5 → 6.3.5, npm:@sveltejs/adapter-static >= 4.0.0-next.0, < 4.0.1 → 4.0.1, npm:@sveltejs/adapter-vercel >= 7.0.0-next.0, < 7.0.2 → 7.0.2, npm:@sveltejs/adapter-static < 3.0.11 → 3.0.11 If an attacker could influence a link that was crawled during the prerender phase, that link could later be interpreted as a regex in the Vercel routing configuration.
SvelteKit: Prerendered redirect paths can inject arbitrary rules into the `_redirects` file generated by `@sveltejs/adapter-cloudflare`
受影响: npm:@sveltejs/adapter-cloudflare >= 4.7.0, < 7.2.10 → 7.2.10, npm:@sveltejs/adapter-cloudflare >= 8.0.0-next.0, < 8.0.2 → 8.0.2 If an attacker can influence the links crawled during prerendering, they can influence the redirects entries that are added to the Cloudflare platform redirects generated during the adapt phase of the build.
SvelteKit: `@sveltejs/adapter-node` crashes when proxying certain requests via `fetch`
受影响: npm:@sveltejs/adapter-node >= 5.5.7, < 5.5.8 → 5.5.8, npm:@sveltejs/adapter-node >= 6.0.0-next.0, < 6.0.1 → 6.0.1 In affected versions, @sveltejs/adapter-node can attempt to add a header to an immutable request in a context that causes the server to crash, denying service to any other requests routed to that server.
11月13日周五
Astro: Reflected XSS via unescaped slot names in @astrojs/svelte
受影响: npm:@astrojs/svelte >= 5.7.3, <= 9.1.1 → 9.1.2 The @astrojs/svelte renderer wraps slotted content passed to Svelte components in an element, and writes the slot name into its name attribute without HTML escaping. A slot name containing " could end the attribute and inject arbitrary HTML into the page. For example, a page that takes a slot name from the request: astro --- import Tabs from '../components/Tabs.svelte'; const tab = Astro.url.searchParams.get('tab'); --- … rendered with a Svelte 5 component that renders its snippets by name: sve…
10月24日周六
SvelteKit: URL redirection to untrusted site via enhanced form submission
受影响: npm:@sveltejs/kit < 3.0.0 → 3.0.0 Applications using enhanced form actions (use:enhance) on routes that accept paths beginning with //, such as catch-all routes, may be vulnerable to an open redirect. Patches A fix has been prepared for @sveltejs/kit 3.0.0. Users should upgrade to 3.0.0 or later. The fix preserves leading double slashes in action paths without generating protocol-relative URLs, restricts non-redirect action navigation to the current origin, and includes the origin when comparing action locations with the curren…
SvelteKit : XSS via untrusted cache-control header in prerendered page
受影响: npm:@sveltejs/kit < 3.0.0 → 3.0.0 Applications that prerender pages and use setHeaders to set a cache-control header from an untrusted source are vulnerable to cross-site scripting (XSS). SvelteKit inserts the header value into a tag without escaping it. An attacker who can influence this value at prerender time can break out of the content attribute and inject HTML or JavaScript into the generated page. The injected code can then execute when users visit the page. Patches The fix escapes the header value before inserting it in…
4月28日周日
Bun v1.1.6
Fixes 10 bugs (addressing 512 👍). UDP sockets! node:dgram! DataDog and ClickHouseDB! Fixes a bug impacting SvelteKit. Array#sort gets 15% - 135% faster. Fixes a regression in node:http from v1.1.5. Node.js compatibiltiy improvements and bugfixes.
9月19日周二
The State of Web Frameworks on Deno
With npm compatibility in Deno improving, and npm specifiers now available on Deno Deploy, there are more options than ever to build web apps on Deno. Let's explore some options, including Fresh, SvelteKit, Nuxt/Vue, Astro, and beyond.
8月24日周四
Bun v0.8.0
Bun gets debugger support, fetch streaming, and `bun update`. ReadStream and WriteStream from `node:tty` are implemented, including raw mode on `process.stdin`. SvelteKit now works in Bun. Plus bug fixes and stability improvements.
12月5日周一
On Escape's Vue 2 to Svelte Migration
Recently, folks at Escape shared a blog post talking about their migration from Vue 2 to Svelte, and compared Vue 3 with Svelte. We found that the article contained a number of inaccuracies. In this post, we will share some thoughts from our perspective and hope to clarify the potential misconceptions the post could give rise to.