[GH-ISSUE #4286] [Issue]: Bound NovelAI ZIP decompression output #2319

Closed
opened 2026-10-21 05:47:16 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @SpicyMarinara on GitHub (Jul 30, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4286

Originally assigned to: @SpicyMarinara on GitHub.

Summary

NovelAI image ZIP responses are decompressed without an explicit output ceiling. A malicious or corrupted archive can claim or produce an unexpectedly large payload.

Expected behavior

ZIP parsing should reject oversized declarations before inflation, cap actual decompressed output, validate stored/deflated size consistency, and reject malformed archives.

Actual behavior

The parser validates the container shape but does not enforce a strict decompressed-output budget.

Steps to reproduce

  1. Route a crafted NovelAI-compatible ZIP response to the image-generation response parser.
  2. Use a small compressed payload that expands beyond a safe image-response limit.
  3. Observe that decompression is not bounded by an explicit application limit.

Environment

  • Marinara Engine version: current staging
  • Install type: any
  • OS + version: any supported platform
  • Browser or app shell: any

Logs, screenshots, or video

Not applicable; this is a server-side parser hardening issue.

Additional context

Regression coverage should include stored and deflated success cases, oversized declarations, expansion beyond the ceiling, mismatched sizes, and malformed archives.

Template check

The intentionally pre-checked template box has been removed after reading the template.

Originally created by @SpicyMarinara on GitHub (Jul 30, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4286 Originally assigned to: @SpicyMarinara on GitHub. ## Summary NovelAI image ZIP responses are decompressed without an explicit output ceiling. A malicious or corrupted archive can claim or produce an unexpectedly large payload. ## Expected behavior ZIP parsing should reject oversized declarations before inflation, cap actual decompressed output, validate stored/deflated size consistency, and reject malformed archives. ## Actual behavior The parser validates the container shape but does not enforce a strict decompressed-output budget. ## Steps to reproduce 1. Route a crafted NovelAI-compatible ZIP response to the image-generation response parser. 2. Use a small compressed payload that expands beyond a safe image-response limit. 3. Observe that decompression is not bounded by an explicit application limit. ## Environment - Marinara Engine version: current `staging` - Install type: any - OS + version: any supported platform - Browser or app shell: any ## Logs, screenshots, or video Not applicable; this is a server-side parser hardening issue. ## Additional context Regression coverage should include stored and deflated success cases, oversized declarations, expansion beyond the ceiling, mismatched sizes, and malformed archives. ## Template check The intentionally pre-checked template box has been removed after reading the template.
bsakaguchi 2026-10-21 05:47:16 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2319
No description provided.