Vulnerabilities in pkg:npm/form-data-objectizer

PACKAGE
Advisory Identifier: GHSA-m2hg-wjq3-28wq
Advisory Summary

CVE-2026-46510 is a HIGH (CVSS 8.2) prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting form-data-objectizer libraries in the npm ecosystem. The issue involves prototype pollution in form-data-objectizer via bracket-notation form keys. Remediation is available by upgrading affected packages to version 1.0.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/form-data-objectizer

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-m2hg-wjq3-28wq CVE-2026-46510 HIGH form-data-objectizer: Prototype pollution in form-data-objectizer via bracket-notation form keys

CVE-2026-46510 at a Glance

CVE Identifier CVE-2026-46510
GHSA Identifier GHSA-m2hg-wjq3-28wq
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product form-data-objectizer
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-46510

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

form-data-objectizer fixed: 1.0.1
npm install form-data-objectizer@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 form-data-objectizer

How to Check if You Are Affected

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

npm ls form-data-objectizer

Analyze the terminal output to locate any version of form-data-objectizer 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 form-data-objectizer 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 form-data-objectizer, 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 `form-data-objectizer` walks bracket-notation form keys (e.g. `name[sub]`) into nested objects without filtering `__proto__`, `constructor`, or `prototype`. A single HTTP form field whose name starts with `__proto__[...]` causes the library to mutate `Object.prototype`, which is a prototype pollution primitive of the entire Node.js process. The bug is in `treatInitial` and `treatSecond` inside `index.cjs`: ```js if (inputName in result) { // 'in' walks the prototype chain, so '__proto__' matches newResult = result[inputName] // newResult === Object.prototype } // ... result[key] = value // sets the property on Object.prototype ``` With the form key `__proto__[polluted]` and value `yes`: 1. `treatInitial` matches `inputName = "__proto__"`, `rest = "[polluted]"`. 2. `"__proto__" in result` is true (inherited), so `newResult = result["__proto__"]`, which is `Object.prototype`. 3. `treatSecond` recurses with `key = "polluted"`, `newRest = ""`, and assigns `Object.prototype.polluted = "yes"`. ## Affected versions - `form-data-objectizer` `<= 1.0.0` (currently the only published version) ## Patched Not yet. Suggested fix: reject any segment equal to `__proto__`, `constructor`, or `prototype` before walking into `result[inputName]` / `result[key]`. Either throw or skip the entry. Minimum patch in `treatInitial` and `treatSecond`: ```js const REJECT = new Set(['__proto__', 'constructor', 'prototype']); if (REJECT.has(inputName) || REJECT.has(key)) { return; // or throw } ``` Using `Object.create(null)` for the `result` object would also work since it has no prototype to pollute, but the `key === '__proto__'` direct write still needs guarding. ## Proof of concept Fresh install on Node 18+: ```sh mkdir pp-fdo && cd pp-fdo npm init -y npm install form-data-objectizer@1.0.0 ``` ```js // poc.js const FormDataToObject = require('form-data-objectizer'); const form = new FormData(); form.append('username', 'alice'); form.append('__proto__[polluted]', 'yes'); FormDataToObject.toObject(form); console.log(({}).polluted); // -> 'yes' ``` Observed output: ``` package version: 1.0.0 before pollution: undefined after pollution: yes parsed data: { username: 'alice' } confirmed: YES, prototype polluted ``` The field name `__proto__[polluted]` is the kind of value an attacker can submit from any HTML form or HTTP client. After the call, every plain object in the process inherits `polluted = 'yes'`. The visible parsed output drops the malicious key, so the attack leaves no obvious trace in request logs that show parsed bodies. A second working payload is `constructor[prototype][polluted]=yes`, which walks `result.constructor` then `.prototype`. ## Impact - Default-reachable prototype pollution via a single unauthenticated HTTP form submission, in any Node.js application that uses `form-data-objectizer.toObject()` on incoming form data. - Persists for the life of the worker process and affects every subsequent request handled by the same process. - Direct downstream consequences depend on the host application and the rest of its dependency tree, but typical risks include: bypassing `if (obj.isAdmin)` style checks, injecting unintended config values into objects merged with user input, breaking template rendering, and crashing the worker by polluting properties used by other libraries (DoS). ## CVSS `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L` (8.2, High) Integrity is High because the primitive lets the attacker change the meaning of property reads on every object in the process. Confidentiality is None and Availability is Low without a named downstream gadget; both could be higher in a specific consuming app. ## Credit Reported by Mohamed Bassia (@0xBassia).

CVE-2026-46510 Affected form-data-objectizer Versions

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

References

Frequently Asked Questions

What is CVE-2026-46510?
CVE-2026-46510 is a security vulnerability in form-data-objectizer involving Prototype pollution in form-data-objectizer via bracket-notation form keys under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which form-data-objectizer versions are affected?
Affected versions include releases prior to 1.0.1 across affected packages: form-data-objectizer.
What version fixes CVE-2026-46510?
Upgrading to 1.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is form-data-objectizer affected?
Yes, form-data-objectizer 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-46510?
CVE-2026-46510 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-46510?
CVE-2026-46510 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-46510?
Run the dependency tree command: 'npm ls form-data-objectizer'. 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-m2hg-wjq3-28wq",
  "modified" : "2026-06-09T10:28:03Z",
  "published" : "2026-05-18T13:28:31Z",
  "aliases" : [ "CVE-2026-46510" ],
  "summary" : "form-data-objectizer: Prototype pollution in form-data-objectizer via bracket-notation form keys",
  "details" : "## Summary\n\n`form-data-objectizer` walks bracket-notation form keys (e.g. `name[sub]`) into nested objects without filtering `__proto__`, `constructor`, or `prototype`. A single HTTP form field whose name starts with `__proto__[...]` causes the library to mutate `Object.prototype`, which is a prototype pollution primitive of the entire Node.js process.\n\nThe bug is in `treatInitial` and `treatSecond` inside `index.cjs`:\n\n```js\nif (inputName in result) {           // 'in' walks the prototype chain, so '__proto__' matches\n  newResult = result[inputName]      // newResult === Object.prototype\n}\n// ...\nresult[key] = value                  // sets the property on Object.prototype\n```\n\nWith the form key `__proto__[polluted]` and value `yes`:\n\n1. `treatInitial` matches `inputName = \"__proto__\"`, `rest = \"[polluted]\"`.\n2. `\"__proto__\" in result` is true (inherited), so `newResult = result[\"__proto__\"]`, which is `Object.prototype`.\n3. `treatSecond` recurses with `key = \"polluted\"`, `newRest = \"\"`, and assigns `Object.prototype.polluted = \"yes\"`.\n\n## Affected versions\n\n- `form-data-objectizer` `<= 1.0.0` (currently the only published version)\n\n## Patched\n\nNot yet. Suggested fix: reject any segment equal to `__proto__`, `constructor`, or `prototype` before walking into `result[inputName]` / `result[key]`. Either throw or skip the entry.\n\nMinimum patch in `treatInitial` and `treatSecond`:\n\n```js\nconst REJECT = new Set(['__proto__', 'constructor', 'prototype']);\nif (REJECT.has(inputName) || REJECT.has(key)) {\n  return; // or throw\n}\n```\n\nUsing `Object.create(null)` for the `result` object would also work since it has no prototype to pollute, but the `key === '__proto__'` direct write still needs guarding.\n\n## Proof of concept\n\nFresh install on Node 18+:\n\n```sh\nmkdir pp-fdo && cd pp-fdo\nnpm init -y\nnpm install form-data-objectizer@1.0.0\n```\n\n```js\n// poc.js\nconst FormDataToObject = require('form-data-objectizer');\n\nconst form = new FormData();\nform.append('username', 'alice');\nform.append('__proto__[polluted]', 'yes');\n\nFormDataToObject.toObject(form);\nconsole.log(({}).polluted); // -> 'yes'\n```\n\nObserved output:\n\n```\npackage version: 1.0.0\nbefore pollution: undefined\nafter pollution:  yes\nparsed data:     { username: 'alice' }\nconfirmed:       YES, prototype polluted\n```\n\nThe field name `__proto__[polluted]` is the kind of value an attacker can submit from any HTML form or HTTP client. After the call, every plain object in the process inherits `polluted = 'yes'`. The visible parsed output drops the malicious key, so the attack leaves no obvious trace in request logs that show parsed bodies.\n\nA second working payload is `constructor[prototype][polluted]=yes`, which walks `result.constructor` then `.prototype`.\n\n## Impact\n\n- Default-reachable prototype pollution via a single unauthenticated HTTP form submission, in any Node.js application that uses `form-data-objectizer.toObject()` on incoming form data.\n- Persists for the life of the worker process and affects every subsequent request handled by the same process.\n- Direct downstream consequences depend on the host application and the rest of its dependency tree, but typical risks include: bypassing `if (obj.isAdmin)` style checks, injecting unintended config values into objects merged with user input, breaking template rendering, and crashing the worker by polluting properties used by other libraries (DoS).\n\n## CVSS\n\n`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L` (8.2, High)\n\nIntegrity is High because the primitive lets the attacker change the meaning of property reads on every object in the process. Confidentiality is None and Availability is Low without a named downstream gadget; both could be higher in a specific consuming app.\n\n## Credit\n\nReported by Mohamed Bassia (@0xBassia).",
  "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" : "form-data-objectizer"
    },
    "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/kaspernj/form-data-objectizer/security/advisories/GHSA-m2hg-wjq3-28wq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-46510"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kaspernj/form-data-objectizer/commit/7c54b99408e6e9cd6533b7245bf197dadc2a2dbc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kaspernj/form-data-objectizer"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-18T13:28:31Z",
    "nvd_published_at" : "2026-05-29T14:16:31Z"
  }
}