This repository was archived by the owner on Jan 22, 2024. It is now read-only.
chore(deps): update dependency @sveltejs/kit to v1.15.2 [security] #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.0.0-next.484->1.15.2GitHub Vulnerability Alerts
CVE-2023-29003
Summary
The SvelteKit framework offers developers an option to create simple REST APIs. This is done by defining a
+server.jsfile, containing endpoint handlers for different HTTP methods.SvelteKit provides out-of-the-box cross-site request forgery (CSRF) protection to it’s users. The protection is implemented at
kit/src/runtime/server/respond.js#L52. While the implementation does a sufficient job in mitigating common CSRF attacks, the protection can be bypassed by simply specifying a differentContent-Typeheader value.Details
The CSRF protection is implemented using the code shown below.
If the incoming request specifies a POST method (1), the protection will compare the server’s origin with the value of the HTTP
Originheader (2). A mismatch between these values signals that a potential attack has been detected. The final check is performed on the request’sContent-Typeheader (3) whether the value is eitherapplication/x-www-form-urlencodedormultipart/form-data(kit/src/utils/http.js#L71). If all the previous checks pass, the request will be rejected with an 403 error response (4).The
is_form_content_typevalidation is not sufficient to mitigate all possible variations of this type of attack. If a CSRF attack is performed with theContent-Typeheader set totext/plain, the protection will be circumvented and the request will be processed by the endpoint handler.Impact
If abused, this issue will allow malicious requests to be submitted from third-party domains, which can allow execution of operations within the context of the victim's session, and in extreme scenarios can lead to unauthorized access to users’ accounts.
Remediation
SvelteKit 1.15.1 updates the
is_form_content_typefunction call in the CSRF protection logic to includetext/plain.As additional hardening of the CSRF protection mechanism against potential method overrides, SvelteKit 1.15.1 is now performing validation on PUT, PATCH and DELETE methods as well. This latter hardening is only needed to protect users who have put in some sort of
?_method=override feature themselves in theirhandlehook, so that the request thatresolvesees could bePUT/PATCH/DELETEwhen the browser issues aPOSTrequest.CVE-2023-29008
Summary
The SvelteKit framework offers developers an option to create simple REST APIs. This is done by defining a
+server.jsfile, containing endpoint handlers for different HTTP methods.SvelteKit provides out-of-the-box cross-site request forgery (CSRF) protection to its users. The protection is implemented at
kit/src/runtime/server/respond.js. While the implementation does a sufficient job of mitigating common CSRF attacks, the protection can be bypassed by simply specifying an upper-casedContent-Typeheader value. The browser will not send uppercase characters on form submission, but this check does not block all expected cross-site requests: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requestsDetails
The CSRF protection is implemented using the code shown below.
If the incoming request specifies a POST/PUT/PATCH/DELETE method, the protection will compare the server’s origin with the value of the HTTP Origin header. A mismatch between these values signals that a potential attack has been detected. The final check is performed on the request’s
Content-Typeheader whether the value is eitherapplication/x-www-form-urlencoded,multipart/form-dataortext/plain. If all the previous checks pass, the request will be rejected with an 403 error response.However,
is_form_content_type, which is responsible for checking the value of theContent-Typeheader, is not sufficient to mitigate all possible variations of this type of attack. Since this function is checkingContent-Typewith lower-cased values, and the browser accepts upper-casedContent-Typeheader to be sent, a CSRF attack performed with theContent-Typeheader that contains an upper-cased character (e.g.,text/plaiN) can circumvent the protection and the request will be processed by the endpoint handler.Impact
If abused, this issue will allow malicious requests to be submitted from third-party domains, which can allow execution of operations within the context of the victim's session, and in extreme scenarios can lead to unauthorized access to users’ accounts. This may lead to all POST operations requiring authentication being allowed in the following cases:
SameSite=Noneon its auth cookie and the user visits a malicious site in a Chromium-based browserSameSiteattribute explicitly and the user visits a malicious site with Firefox/Safari with tracking protections turned off.Remediations
It is preferred to update to SvelteKit 1.15.2. It is also recommended to explicitly set
SameSiteto a value other thanNoneon authentication cookies especially if the upgrade cannot be done in a timely manner.Release Notes
sveltejs/kit (@sveltejs/kit)
v1.15.2Compare Source
Patch Changes
ba436c66)v1.15.1Compare Source
Patch Changes
chore: more compact representation for invalidated search param (#9708)
chore: fix import path to app script on windows (#9743)
fix: make $app/navigation more resilient to bundler reordering (#9808)
fix: page load
fetch()now accepts the same input types for the body as the native fetch function (#9801)fix: handle preload and filterSerializedResponseHeaders in sequence function (#9741)
v1.15.0Compare Source
Minor Changes
SubmitFunctionthrough./$types(#9201)Patch Changes
fix: throw error when file can't be found in Vite manifest (#9558)
fix: make
error.messageenumerable when sendingssrLoadModuleerror to client (#9440)fix: pass
publicDirVite config in SSR (#9565)fix: balance parentheses in error about wrong content type for action (#9513)
v1.14.0Compare Source
Minor Changes
Patch Changes
submittertype toSumbitFunction(#9484)v1.13.0Compare Source
Minor Changes
Patch Changes
v1.12.0Compare Source
Minor Changes
feat: expose submitter in use:enhance SubmitFunction (#9425)
feat: add data-sveltekit-keepfocus and data-sveltekit-replacestate options to links (requires Svelte version 3.56 for type-checking with
svelte-check) (#9019)Patch Changes
fix: don't start debugger on 404s (#9424)
fix: handle srcset attributes with newline after comma (#9388)
fix: allow tsconfig to extend multiple other tsconfigs (#9413)
chore: update Undici to 5.21.0 (#9417)
v1.11.0Compare Source
Minor Changes
feat: pause on debugger when falling back to full page reload during development (#9305)
feat: expose
basevia$service-worker, make paths relative (#9250)Patch Changes
fix: don't automatically prerender non-SSR'd pages (#9352)
fix: use 308 responses for trailing slash redirects, instead of 301s (#9351)
fix: remove buggy cookie path detection (#9298)
fix: don't prevent
beforeNavigatecallbacks from running following a cancelled unloading navigation (#9347)fix: persist DOM state on beforeunload (#9345)
fix: redirect to path with/without trailing slash when previewing prerendered pages (#9353)
fix: avoid FOUC when using CSS modules in dev (#9323)
fix: don't skip required parameters after missing optional parameters (#9331)
fix: account for server-emitted assets when prerenering (#9349)
fix: deal with fast consecutive promise resolutions when streaming (#9332)
chore: replace deprecated property access in preparation for TS 5.0 (#9361)
v1.10.0Compare Source
Minor Changes
cookies.getAll(#9287)Patch Changes
fix: always include
<link rel="stylesheet">, even for stylesheets excluded from Link headers (#9255)fix: preserve form state when submitting a second time (#9267)
v1.9.3Compare Source
Patch Changes
v1.9.2Compare Source
Patch Changes
v1.9.1Compare Source
Patch Changes
v1.9.0Compare Source
Minor Changes
paths.relativeoption to control interpretation ofpaths.assetsandpaths.base(#9220)v1.8.8Compare Source
Patch Changes
@sveltejs/kittonoExternalfor ssr build (#9242)api.methodsandpage.methodstobuilder.routes(#9145)v1.8.7Compare Source
Patch Changes
paths.base(#9232)v1.8.6Compare Source
Patch Changes
v1.8.5Compare Source
Patch Changes
handle(#9198)v1.8.4Compare Source
Patch Changes
fix: include .mjs files in precompression (#9179)
fix: revert mjs extension usage by default, make it an option (#9179)
chore: dummy changeset to force a release (#9207)
v1.8.3Compare Source
Patch Changes
v1.8.2Compare Source
Patch Changes
v1.8.1Compare Source
Patch Changes
v1.8.0Compare Source
Minor Changes
Patch Changes
fix: set public env before starting app (#8957)
fix: preload modules on Safari (#8957)
fix: make
assetswork in client when app is served from a subfolder (#8957)v1.7.2Compare Source
Patch Changes
builder.writeClient()(#9095)v1.7.1Compare Source
Patch Changes
v1.7.0Minor Changes
Patch Changes
v1.6.0Minor Changes
OPTIONSserver method (#8731)Patch Changes
missing "./paths" specifier in "@​sveltejs/kit" packageerror occurring in all projects (#9050)v1.5.7Patch Changes
v1.5.6Patch Changes
fix: ssr defaults preventing minification for client build (#9012)
fix: client-side trailing slash redirect when preloading data (#8982)
v1.5.5Compare Source
Patch Changes
v1.5.3Compare Source
Patch Changes
docs: clarify that
version.nameshould be deterministic (#8956)fix: correctly include exported http methods in allow header (#8968)
chore: polyfill File from node:buffer (#8925)
fix: provide helpful error/warning when calling
fetchduring render (#8551)fix: print useful error when subscribing to SvelteKit's stores at the wrong time during SSR (#8960)
fix: ignore external links when automatically preloading (#8961)
chore: refactor fallback generation (#8972)
v1.5.2Compare Source
Patch Changes
paths.assetstopaths.base(#8928)v1.5.1Compare Source
Patch Changes
fix: pick up config from endpoints (#8933)
fix: don't reuse previous server load cache when there's no server load function (#8893)
fix: deduplicate paths in tsconfig (#8880)
docs: clarify version management feature (#8941)
v1.5.0Compare Source
Minor Changes
feat: support route-level configuration (#8740)
feat: add snapshot mechanism for preserving ephemeral DOM state (#8710)
Patch Changes
v1.4.0Compare Source
Minor Changes
Patch Changes
fix: ensure types of all form actions are accessible even if differing (#8877)
fix: correctly handle HttpErrors on the client side (#8829)
docs: discourage use of
gotowith external URLs (#8837)fix: prevent crawling empty urls (
<img src="">) (#8883)fix: correctly serialize request url when using load
fetch(#8876)fix: ensure endpoints can fetch endpoints on the same host but not part of the application (#8869)
v1.3.10Compare Source
Patch Changes
v1.3.9Compare Source
Patch Changes
v1.3.8Compare Source
Patch Changes
v1.3.7Compare Source
Patch Changes
fix: only show prerendering message when actually prerendering (#8809)
fix: handle anchors with special chars when navigating (#8806)
fix: await finalise hook and run it only once (#8817)
v1.3.6Compare Source
Patch Changes
fix: allow rest parameters to follow multiple optional - or not - parameters (#8761)
fix: consider headers when constructing request hash (#8754)
v1.3.5Compare Source
Patch Changes
docs: fix typo (#8790)
fix: build error on layout with missing leaves (#8792)
fix: handle hash links with non-ASCII characters when navigating (#8767)
v1.3.4Compare Source
Patch Changes
v1.3.3Compare Source
Patch Changes
process.envto child process (#8777)v1.3.2Compare Source
Patch Changes
v1.3.1Compare Source
Patch Changes
v1.3.0Compare Source
Minor Changes
Patch Changes
v1.2.10Compare Source
Patch Changes
chore: restrict methods allowed for POST (#8721)
fix: provide proper error when POSTing to a missing page endpoint (#8714)
v1.2.9Compare Source
Patch Changes
v1.2.8Compare Source
Patch Changes
v1.2.7Compare Source
Patch Changes
v1.2.6Compare Source
Patch Changes
v1.2.5Compare Source
Patch Changes
v1.2.4Compare Source
Patch Changes
v1.2.3Compare Source
Patch Changes
v1.2.2Compare Source
Patch Changes
v1.2.1Compare Source
Patch Changes
chore: restrict methods allowed for POST (#8721)
fix: provide proper error when POSTing to a missing page endpoint (#8714)
v1.2.0Compare Source
Minor Changes
feat: add
text(...)helper for generating text responses (#8371)feat: enable access to public env within app.html (#8449)
fix: add
Content-Lengthheader to SvelteKit-generated responses (#8371)v1.1.4Compare Source
Patch Changes
+error.sveltecomponents (#8593)v1.1.3Compare Source
Patch Changes
docs: explain how to add ambient typings (#8558)
fix: ignore
target="_blank"links (#8563)v1.1.2Compare Source
Patch Changes
fix: correct link in types documentation (#8557)
fix: correctly detect changed data (#8377)
fix: only generate type definitions with
synccommand (#8552)fix: remove baseUrl to prevent wrong TypeScript auto imports if possible (#8568)
v1.1.1Compare Source
Patch Changes
v1.1.0Compare Source
Minor Changes
.sveltefiles or missing<slot />in layout is detected (#8475)Patch Changes
fix: exit postbuild step with code 0 (#8514)
fix: only run missing page check in dev mode (#8515)
fix: avoid input name clobbering form method check (#8471)
fix: exclude service worker from tsconfig (#8508)
fix: provide better error message in case of missing
+page.svelte(#8478)v1.0.13Compare Source
Patch Changes
v1.0.12Compare Source
Patch Changes
fix: make prerendered endpoint callable from non-prerendered server load (#8453)
docs: add links to http status codes (#8480)
fix: prerender page when prerender set to 'auto' and ssr set to true (#8481)
fix: prevent false positive warnings for fetch uses in firefox (#8456)
fix: check version on node fetch fail (#8487)
fix: avoid unnecessary $page store updates (#8457)
v1.0.11Compare Source
Patch Changes
<a>elements with nohrefattribute when refocusing after navigation (#8418)fetchin server load functions (#8420)v1.0.10Compare Source
Patch Changes
v1.0.9Compare Source
Patch Changes
assetFileNamesto worker rollup options (#8384)v1.0.8Compare Source
Patch Changes
fetchis used with relative URL (#8370)updated.check()type changed toPromise<boolean>(#8400)<link>elements (#8369)v1.0.7Compare Source
Patch Changes
*.test.jsand*.spec.jsfiles inparamsdirectory (#8250)v1.0.6Compare Source
Patch Changes
$page.routehas the correct shape (#8359)v1.0.5Compare Source
Patch Changes
event.platformto be possibly undefined (#8232)v1.0.3Compare Source
Patch Changes
<form method="get">(#8273)v1.0.2Compare Source
Patch Changes
filterSerializedResponseHeaderserror message (#8348)v1.0.1Compare Source
Patch Changes
v1.0.0Compare Source
Major Changes
First major release, see below for the history of changes that lead up to this.
Starting from now all releases follow semver and changes will be listed as Major/Minor/Patch
v1.0.0-next.589Compare Source
Patch Changes
v1.0.0-next.588Compare Source
Patch Changes
v1.0.0-next.587Compare Source
Patch Changes
v1.0.0-next.586Compare Source
Patch Changes
v1.0.0-next.585Compare Source
Patch Changes
v1.0.0-next.584Compare Source
Patch Changes
v1.0.0-next.583Compare Source
Patch Changes
$page.statuswhen usingenhanceand result is of type'error'(#8073)v1.0.0-next.582Compare Source
Patch Changes
v1.0.0-next.581Compare Source
Patch Changes
v1.0.0-next.580Compare Source
Patch Changes
v1.0.0-next.579Compare Source
Patch Changes
v1.0.0-next.578Compare Source
Patch Changes
builder.generateFallback(fallback)(#8013)v1.0.0-next.577Compare Source
Patch Changes
v1.0.0-next.576Compare Source
Patch Changes
sveltekit()return a promise of array of Vite plugins (#7994)v1.0.0-next.575Compare Source
Patch Changes
__data.jsonfrom url (#7979)v1.0.0-next.574Compare Source
Patch Changes
v1.0.0-next.573Compare Source
Patch Changes
+(layout|page)(.server)?.jsand+server.jsfiles (#7878)enhanceerror message when form action doesn't exist or csrf is enabled (#7958)v1.0.0-next.572Compare Source
Minor Changes
Patch Changes
magic-string(#7931)v1.0.0-next.571Compare Source
Patch Changes
v1.0.0-next.570Compare Source
Patch Changes
v1.0.0-next.567Compare Source
Patch Changes
v1.0.0-next.566Compare Source
Patch Changes
v1.0.0-next.565Compare Source
Patch Changes
data-sveltekit-prefetchwith-preload-codeand-preload-data(#7776)prefetchtopreloadDataandprefetchRoutestopreloadCode(#7776)v1.0.0-next.564Compare Source
Patch Changes
$page.urlresilient against mutations (#7827)v1.0.0-next.563Compare Source
Patch Changes
formatoption fromgenerateManifest(...)(#7820)v1.0.0-next.562Compare Source
Patch Changes
getStaticDirectory()from builder API (#7809)v1.0.0-next.561Compare Source
Patch Changes
v1.0.0-next.560Compare Source
Patch Changes
prerenderingtobuilding, removeconfig.kit.prerender.enabled(#7762)v1.0.0-next.559Compare Source
Patch Changes
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.