Skip to content

Fix ZIP/XLSX resource exhaustion with streamed decompression limits - #10

Merged
mhatipog merged 3 commits into
mainfrom
fix/zip-xlsx-stream-limits-20261024
Oct 24, 2026
Merged

mhatipog merged 3 commits into
mainfrom
fix/zip-xlsx-stream-limits-20261024

Conversation

@mhatipog

Copy link
Copy Markdown
Owner

Security fix scoped to src/xlsx-lite.js, src/file/metadata.js, and focused regression tests.

  • Count emitted deflate bytes and abort early; enforce defaults of 1,024 entries, 16 MiB per entry, 64 MiB total actual output, and 200:1 ratio.
  • Validate ZIP directory boundaries, local offsets and compressed lengths; reject forged declared sizes.
  • Inspect only necessary Office XML parts; cleaning is bounded across every entry.
  • Bound XLSX row/column/cell references (100,000 rows, 512 columns, 1 million cells).
  • Preserve public APIs; optional lower limits enable tiny attack fixtures.

CI runs npm test.

@mhatipog
mhatipog merged commit 6225266 into main Oct 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant