Skip to content

Fix/zip slip vulnerability#2

Open
OscarRP15 wants to merge 2 commits into
mainfrom
fix/zip-slip-vulnerability
Open

Fix/zip slip vulnerability#2
OscarRP15 wants to merge 2 commits into
mainfrom
fix/zip-slip-vulnerability

Conversation

@OscarRP15
Copy link
Copy Markdown
Owner

Thank you for submitting a pull request to the WebGoat!

Description

Fix Zip Slip vulnerability in ProfileZipSlip.java.

Problem

The application was extracting ZIP entries without validating their paths,
allowing an attacker to write files outside the intended directory using
path traversal payloads like ../.

Solution

  • Validate the canonical path of each ZIP entry before extraction
  • Skip entries that resolve outside the target temporary directory
  • Handle directory entries explicitly
  • Create parent directories safely before writing files

References

- Validate canonical path of each ZIP entry before extraction
- Skip entries that resolve outside the target directory
- Handle directory entries and parent directory creation
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