Skip to content

[Security] ZIP bomb vulnerability in plugin extraction no size limits #347

@csharpfritz

Description

@csharpfritz

Summary

Plugin ZIP extraction in PluginManager.cs has no size limits, compression ratio checks, or path traversal protection. This enables ZIP bomb attacks.

Affected File

src/SharpSite.Web/PluginManager.cs (lines 244-294)

Risks

  • ZIP bomb: A 42KB zip can decompress to petabytes
  • Disk exhaustion: No total or per-file size caps
  • Path traversal: Only empty-name entries are filtered; ../ sequences not explicitly blocked

Recommended Fix

Add max total extracted size (100MB), max single file size (50MB), compression ratio check (100:1), and path normalization with directory containment validation.

Estimated Effort

2-3 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecuritySecurity-related issuesquadSquad triage inbox — Lead will assign to a membersquad:riverAssigned to River (Backend Dev)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions