mchapman87501 / fnf_intake_forms

0 stars 0 forks source link

From Dependabot: SvelteKit vulnerable to Cross-Site Request Forgery #65

Closed mchapman87501 closed 1 year ago

mchapman87501 commented 1 year ago

The alert recommends the following actions:

Upgrade @sveltejs/kit to version 1.15.1 or later. For example:

"dependencies": {
  "@sveltejs/kit": ">=1.15.1"
}
"devDependencies": {
  "@sveltejs/kit": ">=1.15.1"
}

Remediation

SvelteKit 1.15.1 updates the is_form_content_type function call in the CSRF protection logic to include text/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 their handle hook, so that the request that resolve sees could be PUT/PATCH/DELETE when the browser issues a POST request.