René's URL Explorer Experiment


Title: Console breadcrumb serialization invokes getters & DOM traversal on logged objects (regression in 10.55.0: safeJoin now uses stringifyValue instead of String) · Issue #21353 · getsentry/sentry-javascript · GitHub

Open Graph Title: Console breadcrumb serialization invokes getters & DOM traversal on logged objects (regression in 10.55.0: safeJoin now uses stringifyValue instead of String) · Issue #21353 · getsentry/sentry-javascript

X Title: Console breadcrumb serialization invokes getters & DOM traversal on logged objects (regression in 10.55.0: safeJoin now uses stringifyValue instead of String) · Issue #21353 · getsentry/sentry-javascript

Description: Is there an existing issue for this? I have searched the existing issues (no match for safeJoin / stringifyValue / console-breadcrumb getter side effects) I have reviewed the documentation I am using the latest SDK release (reproduces on...

Open Graph Description: Is there an existing issue for this? I have searched the existing issues (no match for safeJoin / stringifyValue / console-breadcrumb getter side effects) I have reviewed the documentation I am usi...

X Description: Is there an existing issue for this? I have searched the existing issues (no match for safeJoin / stringifyValue / console-breadcrumb getter side effects) I have reviewed the documentation I am usi...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/21353

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Console breadcrumb serialization invokes getters & DOM traversal on logged objects (regression in 10.55.0: safeJoin now uses stringifyValue instead of String)","articleBody":"### Is there an existing issue for this?\n\n- [x] I have searched the existing issues (no match for `safeJoin` / `stringifyValue` / console-breadcrumb getter side effects)\n- [x] I have reviewed the documentation\n- [x] I am using the latest SDK release (reproduces on `10.56.0`)\n\n### How do you use Sentry?\n\nSentry SaaS (sentry.io)\n\n### Which SDK are you using?\n\n`@sentry/browser` (root cause is in `@sentry/core`'s `safeJoin`, surfaced via the Breadcrumbs integration; observed through `@sentry/nuxt`)\n\n### SDK Version\n\n10.56.0 (regression introduced in 10.55.0; last unaffected version: 10.54.0)\n\n### Framework Version\n\nNuxt 4 / Vue 3.5\n\n### Reproduction Example/SDK Setup\n\n```js\nimport * as Sentry from '@sentry/browser'\n\n// Default integrations include Breadcrumbs with console capturing enabled\nSentry.init({ dsn: '__YOUR_DSN__' })\n\nconst el = document.createElement('div')\nlet getterInvoked = false\nObject.defineProperty(el, 'id', {\n  get() {\n    getterInvoked = true   // any side effect here now runs during console breadcrumb capture\n    return ''\n  },\n})\n\nconsole.log(el)            // Sentry's console breadcrumb handler serializes the args here\nqueueMicrotask(() => console.warn('getter invoked by Sentry serialization?', getterInvoked))\n// @sentry/core \u003c= 10.54.0  -> false\n// @sentry/core >= 10.55.0  -> true  (incl. 10.56.0)\n```\n\n### Steps to Reproduce\n\n1. Initialize any browser SDK with default integrations (Breadcrumbs `console: true`).\n2. `console.log()` an object that has a property **getter** (e.g. a DOM element, or any object with `Object.defineProperty(..., { get })`).\n3. Observe that the getter is **executed synchronously** as part of breadcrumb creation — even when DevTools is closed and no event is sent.\n\n### Expected Result\n\nCapturing a console breadcrumb should be **side-effect free**: serializing the logged arguments for the breadcrumb `message` must not invoke user-defined property getters, nor traverse the DOM. (`\u003c= 10.54.0` behaved this way — non-primitive args were serialized with `String(value)`.)\n\n### Actual Result\n\nGetters are invoked and DOM elements are walked during breadcrumb serialization.\n\nRoot cause — `@sentry/core` `safeJoin` (`packages/core/src/utils/string.ts`), which the Breadcrumbs integration uses for the console breadcrumb `message` (`message: safeJoin(handlerData.args, ' ')` in `_getConsoleBreadcrumbHandler`):\n\n```diff\n  // \u003c= 10.54.0\n- } else {\n-   output.push(String(value));     // \"[object HTMLDivElement]\" — no getters invoked\n- }\n\n  // >= 10.55.0\n+ } else if (value instanceof Error) {\n+   output.push(value.message ? `${value.name}: ${value.message}` : value.name);\n+ } else {\n+   output.push(stringifyValue(void 0, value));   // \u003c- invokes getters\n+ }\n```\n\nFor DOM elements, `stringifyValue` resolves to `htmlTreeAsString` → `_htmlElementAsString` (`packages/core/src/utils/browser.ts`), which reads `elem.id` / `elem.className` / `elem.getAttribute(...)` and walks the ancestor chain — executing getters and adding DOM-traversal cost to every `console.log(element)`.\n\n### Additional Context\n\n- **Real-world impact (how we found it):** an anti-DevTools library uses the classic trap `Object.defineProperty(div, 'id', { get() { /* assume DevTools open */ } })` followed by `console.log(div)`, expecting the getter to fire only when DevTools renders the object. After upgrading `@sentry/nuxt` `10.53.1 → 10.55.0`, Sentry's breadcrumb serialization began invoking that `id` getter on every page, causing a false \"DevTools open\" detection (and a forced redirect) **with DevTools closed**. We confirmed via a pristine (un-instrumented) iframe `console.log` that the getter is read **only** through the main-window Sentry-instrumented console.\n- **Precedent that this class of bug is known/dangerous:** `safeJoin` already special-cases `isVueViewModel` to avoid serialization side effects (the infinite console-warning loop fixed in #8981). Invoking arbitrary getters / DOM traversal is the same category of risk (side effects, performance, potential exceptions).\n- **Affected range:** `10.55.0` … `10.56.0` (latest). `10.54.0` and earlier are unaffected.\n- **Suggestion:** keep breadcrumb-message serialization side-effect-free for non-primitive args (e.g. retain `String(value)` for the human-readable `message`, since the structured `data.arguments` already carries the raw args for later normalization), or guard `stringifyValue`/`htmlTreeAsString` against invoking getters during breadcrumb capture.\n\n### Priority\n\n\u003csub>React with 👍 to help prioritize this issue.\u003c/sub>\n","author":{"url":"https://github.com/KIM-DONGJU","@type":"Person","name":"KIM-DONGJU"},"datePublished":"2026-06-06T08:57:51Z","url":"https://github.com/getsentry/sentry-javascript/issues/21353"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ceba3100-649b-84fa-5c59-c964ceee3990
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD092:1A4796:41F572:5CE526:6B047069
html-safe-nonce9980a9e221b15fed29511dbf8930f23938e976a04a1504a3336beba1641fc2cc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDkyOjFBNDc5Njo0MUY1NzI6NUNFNTI2OjZCMDQ3MDY5IiwidmlzaXRvcl9pZCI6IjE5MDA5ODYwMzYzMzk4OTY0MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd97a89d4a8bdee579f0d910026130b25f5b2cbf0bf1fc2b69dbb5fed780b48cc
hovercard-subject-tagissue:4602703931
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/21353/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f80bd3b9543d294039277b3807d8f62eb6b7788ab491740446ae9c7acca3546a/getsentry/sentry-javascript/issues/21353
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f80bd3b9543d294039277b3807d8f62eb6b7788ab491740446ae9c7acca3546a/getsentry/sentry-javascript/issues/21353
og:image:altIs there an existing issue for this? I have searched the existing issues (no match for safeJoin / stringifyValue / console-breadcrumb getter side effects) I have reviewed the documentation I am usi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameKIM-DONGJU
hostnamegithub.com
expected-hostnamegithub.com
Noneae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecfb5f24c6e01d85f70804652a5107e5cac03a161
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/21353#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F21353
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F21353
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/21353
Reloadhttps://github.com/getsentry/sentry-javascript/issues/21353
Reloadhttps://github.com/getsentry/sentry-javascript/issues/21353
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues339 (339)https://github.com/getsentry/sentry-javascript/issues
Pull requests55 (55)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/21353
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/21353
#21356https://github.com/getsentry/sentry-javascript/pull/21356
Console breadcrumb serialization invokes getters & DOM traversal on logged objects (regression in 10.55.0: safeJoin now uses stringifyValue instead of String)https://github.com/getsentry/sentry-javascript/issues/21353#top
#21356https://github.com/getsentry/sentry-javascript/pull/21356
Browserhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Browser%22
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Nuxthttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Nuxt%22
https://github.com/KIM-DONGJU
KIM-DONGJUhttps://github.com/KIM-DONGJU
on Jun 6, 2026https://github.com/getsentry/sentry-javascript/issues/21353#issue-4602703931
fix(utils): Prevent iterating over VueViewModel #8981https://github.com/getsentry/sentry-javascript/pull/8981
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jun 6, 2026https://github.com/getsentry/sentry-javascript/issues/21353#event-26417078743
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jun 6, 2026https://github.com/getsentry/sentry-javascript/issues/21353#event-26417080293
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Jun 6, 2026https://github.com/getsentry/sentry-javascript/issues/21353#issuecomment-4638036474
Linear Codehttps://linear.app
JS-2689https://linear.app/getsentry/issue/JS-2689
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jun 6, 2026https://github.com/getsentry/sentry-javascript/issues/21353
github-actionshttps://github.com/apps/github-actions
Browserhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Browser%22
on Jun 6, 2026https://github.com/getsentry/sentry-javascript/issues/21353#event-26417079889
linear-codehttps://github.com/apps/linear-code
Nuxthttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Nuxt%22
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
on Jun 6, 2026https://github.com/getsentry/sentry-javascript/issues/21353#event-26417087730
https://github.com/andreiborza
andreiborzahttps://github.com/andreiborza
on Jun 8, 2026https://github.com/getsentry/sentry-javascript/issues/21353#issuecomment-4646728402
@KIM-DONGJUhttps://github.com/KIM-DONGJU
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jun 8, 2026https://github.com/getsentry/sentry-javascript/issues/21353#event-26460298418
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jun 8, 2026https://github.com/getsentry/sentry-javascript/issues/21353
isaacshttps://github.com/isaacs
on Jun 9, 2026https://github.com/getsentry/sentry-javascript/issues/21353#event-26521542004
fix(core): keep safeJoin side-effect-free for DOM elements (#21356)https://github.com/getsentry/sentry-javascript/commit/4b75699d576b821582fda773baf9b828a6644159
#21356https://github.com/getsentry/sentry-javascript/pull/21356
https://docs.github.com/articles/closing-issues-via-commit-messages
4b75699https://github.com/getsentry/sentry-javascript/commit/4b75699d576b821582fda773baf9b828a6644159
isaacshttps://github.com/isaacs
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#21356https://github.com/getsentry/sentry-javascript/pull/21356
on Jun 9, 2026https://github.com/getsentry/sentry-javascript/issues/21353#event-26521542033
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jun 15, 2026https://github.com/getsentry/sentry-javascript/issues/21353#issuecomment-4707988882
GitHub Actionshttps://help.github.com/en/actions
#21356https://github.com/getsentry/sentry-javascript/pull/21356
10.58.0 releasehttps://github.com/getsentry/sentry-javascript/releases/tag/10.58.0
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/21353
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/21353
Browserhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Browser%22
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Nuxthttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Nuxt%22
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.