security: upgrade xlsx 0.18.5 → 0.20.3 (prototype pollution + ReDoS) - #568
Open
coderdailyone wants to merge 1 commit into
Open
security: upgrade xlsx 0.18.5 → 0.20.3 (prototype pollution + ReDoS)#568coderdailyone wants to merge 1 commit into
coderdailyone wants to merge 1 commit into
Conversation
The spreadsheet preview parses untrusted workspace files with XLSX.read() from xlsx@0.18.5, which is affected by: CVE-2023-30533 (GHSA-4r6h-8v6p-xvw6) prototype pollution, fixed 0.19.3 CVE-2024-22363 (GHSA-5pgg-2g8v-p4x9) ReDoS, fixed 0.20.2 The npm 'xlsx' package is frozen at 0.18.5 and will never receive the fix — SheetJS ships current builds only from their CDN, so npm-audit workflows can't resolve this. Point the dependency at SheetJS's official CDN tarball (their documented install method) at 0.20.3, which carries both fixes. No code change: XLSX.read + XLSX.utils.sheet_to_json are unchanged across these versions (tsc --noEmit passes). The lockfile shrinks because 0.20.x bundles the former transitive deps (cfb, codepage, crc-32, ssf, …). Fixes andrewyng#516 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CLxsdFGXjdztTRNHjNgPXP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #516.
The spreadsheet preview (
SheetViewer) parses untrusted workspace files withXLSX.read()from xlsx@0.18.5, which is affected by two CVEs:XLSX.read()XLSX.read()The npm
xlsxpackage is frozen at 0.18.5 and will never receive the fix — SheetJS distributes current builds only from their CDN, sonpm auditcan't resolve it. This points the dependency at SheetJS's official CDN tarball (their documented install method) at 0.20.3, which carries both fixes.Why the CDN URL
It's the vendor's only supported channel for current versions — the registry package is intentionally abandoned upstream. Same package, pinned to an exact immutable tarball with an integrity hash in the lockfile.
No code change
XLSX.read(base64, {type:"base64"})andXLSX.utils.sheet_to_json(...)are unchanged across these versions.tsc --noEmitpasses clean. The lockfile shrinks by ~91 lines because 0.20.x bundles the former transitive deps (cfb,codepage,crc-32,ssf,adler-32,frac,wmf,word) into the main package.Verification
npm cifrom the regenerated lockfile succeeds; installedxlsx.version === "0.20.3".tsc --noEmit: clean.mainwith the old dependency (so unrelated to this change).🤖 Generated with Claude Code
https://claude.ai/code/session_01CLxsdFGXjdztTRNHjNgPXP