Vulnerabilities in pkg:npm/parse-nested-form-data

PACKAGE
Advisory Identifier: GHSA-xp7r-j8r6-j9h3
Advisory Summary

CVE-2026-45302 is a HIGH (CVSS 8.2) parse-nested-form-data has prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Parse nested form data libraries in the npm ecosystem. The issue involves parse-nested-form-data has prototype pollution via `__proto__` in formdata field names. Remediation is available by upgrading affected packages to version 1.0.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/parse-nested-form-data

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/parse-nested-form-data. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-xp7r-j8r6-j9h3 CVE-2026-45302 HIGH parse-nested-form-data has Prototype Pollution via `__proto__` in FormData field names

CVE-2026-45302 at a Glance

CVE Identifier CVE-2026-45302
GHSA Identifier GHSA-xp7r-j8r6-j9h3
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Parse nested form data
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2026-45302

To remediate this vulnerability, upgrade all affected Parse nested form data dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

parse-nested-form-data fixed: 1.0.1
npm install parse-nested-form-data@1.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls parse-nested-form-data

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-45302, inspect your project dependencies using npm:

npm ls parse-nested-form-data

Analyze the terminal output to locate any version of Parse nested form data in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1), your application is affected.

Note: The npm ls parse-nested-form-data command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Parse nested form data, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary `parseFormData()` walks bracket and dot-notation FormData field names into nested objects without filtering reserved property keys. A single FormData field whose name begins with `__proto__`, or contains `.__proto__.` mid-path, causes the parser to traverse onto `Object.prototype` and assign properties there, polluting the prototype chain of every plain object in the running process. ## Details The vulnerability is in `handlePathPart` in `src/index.ts`, which performs `currentObject[pathPart.path]` and `currentObject[pathPart.path] = val` for object-type path segments without rejecting reserved keys. When the segment is `__proto__`, the read returns `Object.prototype`, which then becomes the next traversal target, and the next assignment lands on the prototype. Reproduction on a fresh install of `parse-nested-form-data@1.0.0`: ```js import { parseFormData } from 'parse-nested-form-data'; const fd = new FormData(); fd.append('__proto__.polluted', 'yes'); parseFormData(fd); console.log(({}).polluted); // -> 'yes' console.log(([]).polluted); // -> 'yes' ``` Equivalent vectors: - `__proto__[polluted]=yes` - `a.__proto__.polluted=yes` (mid-path traversal) - `a[0].__proto__.polluted=yes` (mid-path through an array element) `constructor.prototype.x` was incidentally blocked by an existing duplicate-key guard (because `Object` is a function and failed the JSON-object check), but relying on that was fragile, so the fix denylists `constructor` and `prototype` as well as `__proto__`. The array branch (`a[0]`, `a[]`) was not exploitable in practice - the regex restricts array-index segments to digit characters - but the forbidden-key check is applied before the object/array type branching as defense in depth, so any future change to the regex cannot reintroduce the issue. ## Impact Any application that passes attacker-controlled `FormData` (or any `Iterable<[string, string | File]>`) to `parseFormData()` - typically an HTTP server processing form submissions - allows an unauthenticated remote client to mutate `Object.prototype` of the running process via a single field name. Concrete consequences depend on the host application and may include corrupted application state, altered control flow in code that reads ambient properties off objects, and denial of service. ## Patches Fixed in **1.0.1**. `handlePathPart` now throws a new `ForbiddenKeyError` (also exported) when any path segment is `__proto__`, `constructor`, or `prototype`, regardless of whether the segment would be used as an object key or an array index. The check runs before object/array type branching for defense in depth. Upgrade: ``` npm install parse-nested-form-data@^1.0.1 ``` ## Workarounds If upgrading is not possible, validate field names before calling `parseFormData()`: ```js const FORBIDDEN = /(^|\.)(__proto__|constructor|prototype)($|[.[])/; for (const [name] of formData.entries()) { if (FORBIDDEN.test(name)) throw new Error('Unsafe field name'); } ``` ## Resources - CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') - Fix commit: 527ad58eb486e32438f7198fb88315c20449d792

CVE-2026-45302 Affected Parse nested form data Versions

1 component(s)
Fixed Versions:
1.0.1
Product / Package Ecosystem Affected Versions Fixed Version
parse-nested-form-data
npm
< 1.0.1
1.0.1

References

Frequently Asked Questions

What is CVE-2026-45302?
CVE-2026-45302 is a security vulnerability in Parse nested form data involving parse-nested-form-data has Prototype Pollution via `__proto__` in FormData field names under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Parse nested form data versions are affected?
Affected versions include releases prior to 1.0.1 across affected packages: parse-nested-form-data.
What version fixes CVE-2026-45302?
Upgrading to 1.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is parse-nested-form-data affected?
Yes, parse-nested-form-data is affected in releases prior to 1.0.1. Upgrade your dependency to 1.0.1 or later.
What is the CVSS score of CVE-2026-45302?
CVE-2026-45302 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L.
What CWE is associated with CVE-2026-45302?
CVE-2026-45302 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2026-45302?
Run the dependency tree command: 'npm ls parse-nested-form-data'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xp7r-j8r6-j9h3",
  "modified" : "2026-06-09T10:50:53Z",
  "published" : "2026-05-18T16:43:12Z",
  "aliases" : [ "CVE-2026-45302" ],
  "summary" : "parse-nested-form-data has Prototype Pollution via `__proto__` in FormData field names",
  "details" : "## Summary\n\n`parseFormData()` walks bracket and dot-notation FormData field names into nested objects without filtering reserved property keys. A single FormData field whose name begins with `__proto__`, or contains `.__proto__.` mid-path, causes the parser to traverse onto `Object.prototype` and assign properties there, polluting the prototype chain of every plain object in the running process.\n\n## Details\n\nThe vulnerability is in `handlePathPart` in `src/index.ts`, which performs `currentObject[pathPart.path]` and `currentObject[pathPart.path] = val` for object-type path segments without rejecting reserved keys. When the segment is `__proto__`, the read returns `Object.prototype`, which then becomes the next traversal target, and the next assignment lands on the prototype.\n\nReproduction on a fresh install of `parse-nested-form-data@1.0.0`:\n\n```js\nimport { parseFormData } from 'parse-nested-form-data';\nconst fd = new FormData();\nfd.append('__proto__.polluted', 'yes');\nparseFormData(fd);\nconsole.log(({}).polluted); // -> 'yes'\nconsole.log(([]).polluted); // -> 'yes'\n```\n\nEquivalent vectors:\n\n- `__proto__[polluted]=yes`\n- `a.__proto__.polluted=yes` (mid-path traversal)\n- `a[0].__proto__.polluted=yes` (mid-path through an array element)\n\n`constructor.prototype.x` was incidentally blocked by an existing duplicate-key guard (because `Object` is a function and failed the JSON-object check), but relying on that was fragile, so the fix denylists `constructor` and `prototype` as well as `__proto__`. The array branch (`a[0]`, `a[]`) was not exploitable in practice - the regex restricts array-index segments to digit characters - but the forbidden-key check is applied before the object/array type branching as defense in depth, so any future change to the regex cannot reintroduce the issue.\n\n## Impact\n\nAny application that passes attacker-controlled `FormData` (or any `Iterable<[string, string | File]>`) to `parseFormData()` - typically an HTTP server processing form submissions - allows an unauthenticated remote client to mutate `Object.prototype` of the running process via a single field name. Concrete consequences depend on the host application and may include corrupted application state, altered control flow in code that reads ambient properties off objects, and denial of service.\n\n## Patches\n\nFixed in **1.0.1**. `handlePathPart` now throws a new `ForbiddenKeyError` (also exported) when any path segment is `__proto__`, `constructor`, or `prototype`, regardless of whether the segment would be used as an object key or an array index. The check runs before object/array type branching for defense in depth.\n\nUpgrade:\n\n```\nnpm install parse-nested-form-data@^1.0.1\n```\n\n## Workarounds\n\nIf upgrading is not possible, validate field names before calling `parseFormData()`:\n\n```js\nconst FORBIDDEN = /(^|\\.)(__proto__|constructor|prototype)($|[.[])/;\nfor (const [name] of formData.entries()) {\n  if (FORBIDDEN.test(name)) throw new Error('Unsafe field name');\n}\n```\n\n## Resources\n\n- CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')\n- Fix commit: 527ad58eb486e32438f7198fb88315c20449d792",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-nested-form-data"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.0.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/milamer/parse-nested-form-data/security/advisories/GHSA-xp7r-j8r6-j9h3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45302"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/milamer/parse-nested-form-data/commit/527ad58eb486e32438f7198fb88315c20449d792"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/milamer/parse-nested-form-data"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/milamer/parse-nested-form-data/releases/tag/v1.0.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-18T16:43:12Z",
    "nvd_published_at" : "2026-06-01T19:16:51Z"
  }
}