chore(deps): update dependency sveltekit-superforms to v2.27.4 [security] #155
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:
2.27.1->2.27.4GitHub Vulnerability Alerts
CVE-2025-62381
Summary
sveltekit-superformsv2.27.3 and prior are susceptible to a prototype pollution vulnerability within theparseFormDatafunction offormData.js. An attacker can inject string and array properties intoObject.prototype, leading to denial of service, type confusion, and potential remote code execution in downstream applications that rely on polluted objects.Details
Superforms is a SvelteKit form library for server and client form validation. Under normal operation, form validation is performed by calling the the
superValidatefunction, with the submitted form data and a form schema as arguments:Within the
superValidatefunction, a call is made toparseRequestin order to parse the user's input.parseRequestthen calls intoparseFormData, which in turn looks for the presence of__superform_jsonin the form parameters. If__superform_jsonis present, the following snippet is executed:This snippet deserializes JSON input within the
__superform_json, and then performs a nested assignment into the deserialized object using values from form parameters beginning with__superform_file_and__superform_files_. Since both the target property and value of the assignment is controlled by user input, an attacker can use this to pollute the base object prototype. For example, the following request will polluteObject.prototype.toString, which leads to a persistent denial of service in many applications:PoC
The following PoC demonstrates how this vulnerability can be escalated to remote code execution in the presence of suitable gadgets. The example app represents a typical application signup route, using the popular
nodemailerlibrary (5 million weekly downloads from npm).routes/signup/schema.ts:routes/signup/+page.server.ts:The following Python script then pollutes the base object prototype in order to achieve RCE.
In addition to
nodemailer, the Language-Based Security group at KTH Royal Institute of Technology also compiles gadgets in many other popular libraries and runtimes, which can be used together with this vulnerability.Impact
Attackers can inject string and array properties into
Object.prototype. This has a high probability of leading to denial of service and type confusion, with potential escalation to other impacts such as remote code execution, depending on the presence of reliable gadgets.Release Notes
ciscoheat/sveltekit-superforms (sveltekit-superforms)
v2.27.4Compare Source
Security
dataType: 'json'.v2.27.3Compare Source
v2.27.2Compare Source
Security
Fixed
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.