Title: [Low][store] deepClone does not guard __proto__ key → clone prototype reassignment · Issue #175 · bQuery/bQuery · GitHub
Open Graph Title: [Low][store] deepClone does not guard __proto__ key → clone prototype reassignment · Issue #175 · bQuery/bQuery
X Title: [Low][store] deepClone does not guard __proto__ key → clone prototype reassignment · Issue #175 · bQuery/bQuery
Description: Severity: 🟢 Low (robustness) Location src/store/utils.ts:43-47 (deepClone), consumed by $patchDeep (src/store/create-store.ts:429-443). Description Unlike src/core/utils/object.ts (which guards prototype-pollution keys), the store's deep...
Open Graph Description: Severity: 🟢 Low (robustness) Location src/store/utils.ts:43-47 (deepClone), consumed by $patchDeep (src/store/create-store.ts:429-443). Description Unlike src/core/utils/object.ts (which guards pro...
X Description: Severity: 🟢 Low (robustness) Location src/store/utils.ts:43-47 (deepClone), consumed by $patchDeep (src/store/create-store.ts:429-443). Description Unlike src/core/utils/object.ts (which guards pro...
Opengraph URL: https://github.com/bQuery/bQuery/issues/175
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Low][store] deepClone does not guard __proto__ key → clone prototype reassignment","articleBody":"## Severity: 🟢 Low (robustness)\n\n## Location\n[`src/store/utils.ts:43-47`](../blob/main/src/store/utils.ts#L43-L47) (`deepClone`), consumed by `$patchDeep` ([`src/store/create-store.ts:429-443`](../blob/main/src/store/create-store.ts#L429-L443)).\n\n## Description\nUnlike [`src/core/utils/object.ts`](../blob/main/src/core/utils/object.ts) (which guards prototype-pollution keys), the store's `deepClone` assigns via bracket notation over `Object.keys`:\n```ts\ncloned[key] = deepClone(source[key]);\n```\nA state object with an own enumerable `__proto__` key (e.g. produced by `JSON.parse('{\"__proto__\":{…}}')`) triggers the `__proto__` setter, reassigning the **clone's** prototype rather than copying a data property. This is contained (it does not pollute global `Object.prototype`) but corrupts the cloned object used by `$patchDeep`. A fidelity/robustness bug rather than a global pollution vector.\n\n## Suggested fix\nSkip prototype-pollution keys (reuse `isPrototypePollutionKey` from `object.ts`), or assign with `Object.defineProperty(cloned, key, { value, enumerable: true, writable: true, configurable: true })`.\n\n---\n_Filed as part of a full-codebase security \u0026 correctness audit._\n","author":{"url":"https://github.com/JosunLP","@type":"Person","name":"JosunLP"},"datePublished":"2026-07-05T17:03:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/175/bQuery/issues/175"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c216b3a1-4bc3-a2e5-efcd-b45fbe94735e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9C56:E21F7:B40898:B7F7E8:6A4DB6FF |
| html-safe-nonce | 3a05df28cbd9e0a400aeb78aa92f46c406875392b2272a87259c58cbc1bf0d04 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzU2OkUyMUY3OkI0MDg5ODpCN0Y3RTg6NkE0REI2RkYiLCJ2aXNpdG9yX2lkIjoiMjQ2Mjc4MzIwMzM0NzExNzgyMyIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | e5d71fe8f5f3248a6820231da15612933cc6b0c339d1b8ac0cb4a4161908316b |
| hovercard-subject-tag | issue:4813696024 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bQuery/bQuery/175/issue_layout |
| twitter:image | https://opengraph.githubassets.com/17cf703fadd4267556c95dc55dd51b22b06dc004ada447bafffadfa0361d904a/bQuery/bQuery/issues/175 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/17cf703fadd4267556c95dc55dd51b22b06dc004ada447bafffadfa0361d904a/bQuery/bQuery/issues/175 |
| og:image:alt | Severity: 🟢 Low (robustness) Location src/store/utils.ts:43-47 (deepClone), consumed by $patchDeep (src/store/create-store.ts:429-443). Description Unlike src/core/utils/object.ts (which guards pro... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JosunLP |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/bQuery/bQuery git https://github.com/bQuery/bQuery.git |
| octolytics-dimension-user_id | 256381806 |
| octolytics-dimension-user_login | bQuery |
| octolytics-dimension-repository_id | 1139284244 |
| octolytics-dimension-repository_nwo | bQuery/bQuery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1139284244 |
| octolytics-dimension-repository_network_root_nwo | bQuery/bQuery |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 32f7b614aca06e6bbd89842b1370df1328264f68 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width