René's URL Explorer Experiment


Title: JSON.parse decodes an escaped quote (`\"` → `\`) in a property key under a specific heap state (deterministic under --predictable) · Issue #64546 · nodejs/node · GitHub

Open Graph Title: JSON.parse decodes an escaped quote (`\"` → `\`) in a property key under a specific heap state (deterministic under --predictable) · Issue #64546 · nodejs/node

X Title: JSON.parse decodes an escaped quote (`\"` → `\`) in a property key under a specific heap state (deterministic under --predictable) · Issue #64546 · nodejs/node

Description: Version Reproduced on: Node.js v24.15.0 (V8 13.6.233.17) Node.js v26.5.0 (V8 14.6.202.34) — latest released at time of filing Platform macOS arm64 (Darwin 25.x). Not yet tested on other OS/arch. Subsystem JSON / V8 What steps will reprod...

Open Graph Description: Version Reproduced on: Node.js v24.15.0 (V8 13.6.233.17) Node.js v26.5.0 (V8 14.6.202.34) — latest released at time of filing Platform macOS arm64 (Darwin 25.x). Not yet tested on other OS/arch. Su...

X Description: Version Reproduced on: Node.js v24.15.0 (V8 13.6.233.17) Node.js v26.5.0 (V8 14.6.202.34) — latest released at time of filing Platform macOS arm64 (Darwin 25.x). Not yet tested on other OS/arch. Su...

Opengraph URL: https://github.com/nodejs/node/issues/64546

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JSON.parse decodes an escaped quote (`\\\"` → `\\`) in a property key under a specific heap state (deterministic under --predictable)","articleBody":"### Version\nReproduced on:\n- Node.js **v24.15.0** (V8 13.6.233.17)\n- Node.js **v26.5.0** (V8 14.6.202.34) — latest released at time of filing\n\n### Platform\nmacOS arm64 (Darwin 25.x). Not yet tested on other OS/arch.\n\n### Subsystem\nJSON / V8\n\n### What steps will reproduce the bug?\n\n`JSON.parse(JSON.stringify(obj))` fails to round-trip one specific object: a property **key** that is a single double-quote `\"` (U+0022) comes back as a single backslash `\\` (U+005C) — i.e. the source token `\\\"` is unescaped to `\\` instead of `\"`.\n\nThe triggering object is produced deterministically by `fast-check`. A self-contained repro (one dependency, `fast-check@4.9.0`):\n\n```json\n// package.json\n{ \"type\": \"module\", \"dependencies\": { \"fast-check\": \"4.9.0\" } }\n```\n\n```js\n// repro.mjs\nimport fc from 'fast-check'\n\nconst hasNegativeZero = v => {\n  if (typeof v === 'number') return Object.is(v, -0)\n  if (Array.isArray(v)) return v.some(hasNegativeZero)\n  if (v && typeof v === 'object') return Object.values(v).some(hasNegativeZero)\n  return false\n}\nconst jsonPropsArb = fc\n  .dictionary(fc.string({ minLength: 1, maxLength: 10 }), fc.jsonValue({ maxDepth: 2 }))\n  .filter(props => !hasNegativeZero(props))\nconst refArb = fc.record(\n  { id: fc.string({ maxLength: 10 }), alias: fc.string({ maxLength: 10 }), sourceField: fc.string({ maxLength: 10 }) },\n  { requiredKeys: ['id', 'alias'] },\n)\nconst objArb = fc.record({\n  id: fc.string({ minLength: 1, maxLength: 20 }), workspaceId: fc.string({ minLength: 1, maxLength: 20 }),\n  parentId: fc.option(fc.string({ minLength: 1, maxLength: 20 }), { nil: null }), orderKey: fc.string({ minLength: 1, maxLength: 10 }),\n  content: fc.string({ maxLength: 40 }), properties: jsonPropsArb, references: fc.array(refArb, { maxLength: 5 }),\n  createdAt: fc.integer({ min: 0, max: 2 ** 33 }), updatedAt: fc.integer({ min: 0, max: 2 ** 33 }), userUpdatedAt: fc.integer({ min: 0, max: 2 ** 33 }),\n  createdBy: fc.string({ maxLength: 20 }), updatedBy: fc.string({ maxLength: 20 }), deleted: fc.boolean(),\n})\n\nlet firstBad = null\ntry {\n  fc.assert(fc.property(objArb, obj => {\n    const props = obj.properties ?? {}\n    const back = JSON.parse(JSON.stringify(props))\n    const ok = Object.keys(props).join(' ') === Object.keys(back).join(' ')\n    if (!ok && !firstBad) firstBad = { props, stored: JSON.stringify(props) }\n    return ok\n  }), { numRuns: 25000, seed: -915705129, endOnFailure: true })\n} catch { /* fc throws on the failing property */ }\n\nconst hex = s => [...s].map(c => c.codePointAt(0).toString(16)).join(',')\nconsole.log(`node ${process.version}  v8 ${process.versions.v8}  flags: ${process.execArgv.join(' ') || '(none)'}`)\nconsole.log('reproduced:', !!firstBad)\nif (firstBad) {\n  console.log('input  keys:', Object.keys(firstBad.props).map(hex).join(' | '))\n  console.log('parsed keys:', Object.keys(JSON.parse(firstBad.stored)).map(hex).join(' | '))\n  process.exitCode = 1\n}\n```\n\n```\nnpm install\nnode --predictable repro.mjs      # deterministic — reproduces every run (~2s)\nnode repro.mjs                    # reproduces ~10–15% of runs without the flag\n```\n\n### What is the expected behavior?\n`JSON.parse(JSON.stringify(x))` round-trips; the `\"` key stays `\"` (`0x22`).\n\n### What do you see instead?\n```\ninput  keys: 68 | 22 | 6b,69 | ...\nparsed keys: 68 | 5c | 6b,69 | ...\n```\nThe `22` (`\"`) key is decoded as `5c` (`\\`).\n\n### Additional information\n\nThis is almost certainly a **V8** bug (I'm filing here since it reproduces in stock Node with no native addons; happy to move it to the V8 tracker if you prefer). It was found via property-based fuzzing; the investigation below was AI-assisted. I searched the tracker and didn't find an existing report — apologies if I missed one.\n\nNarrowing (all tested under `--predictable`, so deterministic):\n\n- **`--predictable` makes it 100% reproducible**; unflagged it's ~10–15% per process. So the flakiness is GC-scheduling nondeterminism, not a fuzzer artifact. Also reproduces under `--jitless`, so it is not limited to optimized code.\n- **Not a rope/representation bug.** In the failing process the ConsString from `JSON.stringify`, a `String.fromCharCode(...codeUnits)` flat copy, and an `Array.map().join('')` flat copy of the *identical* ~486-char bytes **all** misparse to `\\`.\n- **Content-specific, not global.** In the same failing process, `JSON.parse(JSON.stringify({'\"':1}))` and the literal `JSON.parse('{\"\\\\\"\":1}')` both decode correctly to `\"`.\n- **Heap-state-dependent.** The exact same bytes parse **correctly** in a cold process, and correctly after 25 000 unrelated `JSON.parse/stringify` warmup round-trips. Only the heap state accumulated by the ~20 420 `fast-check` generations in `repro.mjs` primes it — which is why the repro can't currently be reduced below \"fast-check + this seed\". The stringified source bytes are intact (`… 22 5c 22 22 3a …`, the key `\"` encoded as `\"\\\"\"`); `JSON.stringify` is correct and `JSON.parse` misreads.\n\nThe failing case is `seed: -915705129`, generation index 20419. `--predictable` is the recommended entry point for a debugger — break in the JSON scanner's string/escape handling and inspect the ~486-char source and the key at offset 11.\n","author":{"url":"https://github.com/Stvad","@type":"Person","name":"Stvad"},"datePublished":"2026-07-16T22:32:14Z","url":"https://github.com/nodejs/node/issues/64546"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3e114676-2f0c-58f1-f752-91a6fb10cf48
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD132:AF99F:FCFD7:15B50C:6AED35A5
html-safe-nonce188144f4da4042bcd8dedf472618767bdc59a27ffe3f440130c8d4696aa7c9af
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTMyOkFGOTlGOkZDRkQ3OjE1QjUwQzo2QUVEMzVBNSIsInZpc2l0b3JfaWQiOiIyNjQzODA1MDExMDQ4MjE1OTczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf8f7b19551e511685fba20fc80a7328ad7002735eab03ca0cc150afb297b2333
hovercard-subject-tagissue:4906511467
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/nodejs/node/64546/issue_layout
twitter:imagehttps://opengraph.githubassets.com/80427aefe426962f9c1c0d284ce59fcb13217d82c3ae55090e7858a0af5b1877/nodejs/node/issues/64546
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/80427aefe426962f9c1c0d284ce59fcb13217d82c3ae55090e7858a0af5b1877/nodejs/node/issues/64546
og:image:altVersion Reproduced on: Node.js v24.15.0 (V8 13.6.233.17) Node.js v26.5.0 (V8 14.6.202.34) — latest released at time of filing Platform macOS arm64 (Darwin 25.x). Not yet tested on other OS/arch. Su...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameStvad
hostnamegithub.com
expected-hostnamegithub.com
None26c92a9388ddfad3fa88d132b5d5f0b4747030233dcc4e5efb05f1cbae152184
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
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
releasec629ad99c254d306375fc8354d04321c2c362236
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/64546#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F64546
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%2Fnodejs%2Fnode%2Fissues%2F64546
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=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/64546
Reloadhttps://github.com/nodejs/node/issues/64546
Reloadhttps://github.com/nodejs/node/issues/64546
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests665 (665)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64546
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64546
JSON.parse decodes an escaped quote (\" → \) in a property key under a specific heap state (deterministic under --predictable)https://github.com/nodejs/node/issues/64546#top
https://github.com/Stvad
Stvadhttps://github.com/Stvad
on Jul 16, 2026https://github.com/nodejs/node/issues/64546#issue-4906511467
Stvadhttps://github.com/Stvad
on Jul 16, 2026https://github.com/nodejs/node/issues/64546#event-28094860941
docs(fuzz): link quarantine to upstream nodejs/node#64546 + refresh d…https://github.com/Stvad/knowledge-medium/commit/963749d7b92af61069cd2c290daea0a15cd03885
nodejs/node#64546https://github.com/nodejs/node/issues/64546
963749dhttps://github.com/Stvad/knowledge-medium/commit/963749d7b92af61069cd2c290daea0a15cd03885
https://github.com/Renegade334
Renegade334https://github.com/Renegade334
on Jul 17, 2026https://github.com/nodejs/node/issues/64546#issuecomment-4999261102
#63785https://github.com/nodejs/node/issues/63785
https://github.com/Stvad
Stvadhttps://github.com/Stvad
on Jul 17, 2026https://github.com/nodejs/node/issues/64546#issuecomment-5006637128
#63785https://github.com/nodejs/node/issues/63785
@Renegade334https://github.com/Renegade334
#63785https://github.com/nodejs/node/issues/63785
#63785https://github.com/nodejs/node/issues/63785
Stvadhttps://github.com/Stvad
not plannedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Jul 17, 2026https://github.com/nodejs/node/issues/64546#event-28137609107
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/64546
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64546
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

Viewport: width=device-width


URLs of crawlers that visited me.