Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

scim-patch: Mutation of Inherited Built-in Method Objects

Historical advisory saved 24 Oct 2026 13:17:17 UTC. The publisher may have updated it since then. Latest advisory.

osv · GHSA-2mhw-wcx5-v3xj

Published

## Summary Incomplete Prototype Pollution Fix Allows Mutation of Inherited Built-in Method Objects `scim-patch` blocks direct dangerous path segments such as `__proto__`, `constructor`, and `prototype`, but still traverses inherited properties when applying SCIM patch paths. An 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`. ## Impact A 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. ## Details Affected code paths: - `navigate()` reads inherited properties via `schema[subPath]` - `assign()` uses `key in obj`, which treats inherited properties as existing Because inherited keys are followed, safe-looking path segments such as `toString` can resolve to shared built-in objects. ## PoC ```js const assert = require("node:assert/strict"); const { scimPatch } = require("./lib/src/scimPatch"); const victim = { schemas: ["urn:ietf:params:scim:schemas:core:2.0:User"], userName: "alice", active: true, emails: [{ value: "[email protected]", primary: true }], meta: { created: "x", lastModified: "x", resourceType: "User" } }; try { assert.equal(({}).toString.scimPatchPolluted, undefined); scimPatch(victim, [ { op: "add", path: "toString.scimPatchPolluted", value: "polluted" } ]); assert.equal(({}).toString.scimPatchPolluted, "polluted"); console.log(({}).toString.scimPatchPolluted); } finally { delete Object.prototype.toString.scimPatchPolluted; } ``` Output: ```text polluted ``` A no-path operation with a dotted value key is also affected: ```js scimPatch(victim, [ { op: "add", value: { "toString.noPathPolluted": "polluted" } } ]); ``` ## Remediation Do 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. Keep the existing denylist for `__proto__`, `constructor`, and `prototype` as defense in depth.

Source published
28 Sep 2026 14:01:15 UTC
Source modified
28 Sep 2026 14:15:04 UTC
Saved here
24 Oct 2026 13:17:17 UTC
Source terms
GitHub Advisory Database · CC-BY-4.0

Original source record · Cite this exact observation · Complete original publisher JSON

Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.

CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Publisher rating · MODERATE

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 22 Nov 10:12 UTC · 274 of 275 readable · 270 fully read · documentation 469/469 current