Skip to content

fix: KMZ zip bomb mitigation by adding entry and size limits#1677

Merged
kikoso merged 4 commits intomainfrom
fix/kmz-zip-bomb
Apr 22, 2026
Merged

fix: KMZ zip bomb mitigation by adding entry and size limits#1677
kikoso merged 4 commits intomainfrom
fix/kmz-zip-bomb

Conversation

@kikoso
Copy link
Copy Markdown
Collaborator

@kikoso kikoso commented Apr 16, 2026

Mitigates potential DoS attacks via KMZ 'zip bombs' by enforcing limits on:

  • Total number of entries (max 200)
  • Total uncompressed size (max 50MB)

A new test class is added to verify these limits.

@googlemaps-bot
Copy link
Copy Markdown
Contributor

googlemaps-bot commented Apr 16, 2026

Code Coverage

Overall Project 41.11% -0.7% 🍏
Files changed 42.48%

File Coverage
KmlLayer.java 51.64% -36.07%

*/
public class KmlLayer extends Layer {

private static final int MAX_KMZ_ENTRY_COUNT = 200;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these parameters be configurable with default settings?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been updated.

@kikoso kikoso merged commit bae3455 into main Apr 22, 2026
8 checks passed
@kikoso kikoso deleted the fix/kmz-zip-bomb branch April 22, 2026 13:22
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.

3 participants