Skip to content

FELIX-6836: Mitigate Zip Slip / Path Traversal (CWE-22) Vulnerability in Archive Extraction and Cache Handlers#516

Open
sahvx655-wq wants to merge 3 commits into
apache:masterfrom
sahvx655-wq:mitigate-zip-slip
Open

FELIX-6836: Mitigate Zip Slip / Path Traversal (CWE-22) Vulnerability in Archive Extraction and Cache Handlers#516
sahvx655-wq wants to merge 3 commits into
apache:masterfrom
sahvx655-wq:mitigate-zip-slip

Conversation

@sahvx655-wq

Copy link
Copy Markdown

This PR prevents Zip Slip / Path Traversal issues during ZIP and JAR archive extraction by validating archive entry paths before writing files to disk. Entries that would resolve outside the intended extraction directory are rejected, ensuring extraction remains confined to the target location.

In addition to the implementation changes, regression tests have been added to verify that malicious archives containing traversal entries (for example, ../../evil.txt) are rejected and cause extraction to fail safely.

@paulrutter

Copy link
Copy Markdown
Contributor

@sahvx655-wq before you start creating more PR's, let's first establish what the problem is you're trying to solve.
Every PR should be accompanied with a Jira ticket in https://issues.apache.org/jira/projects/FELIX/summary.

Can you start there first and create tickets for the things you're trying to address?
I want to prevent having PR's that no-one exactly knows the reason for.

@sahvx655-wq sahvx655-wq changed the title Mitigate Zip Slip / Path Traversal (CWE-22) Vulnerability in Archive Extraction FELIX-6836: Mitigate Zip Slip / Path Traversal (CWE-22) Vulnerability in Archive Extraction and Cache Handlers Jun 16, 2026
@sahvx655-wq

Copy link
Copy Markdown
Author

I have created the Jira ticket for this issue here : https://issues.apache.org/jira/browse/FELIX-6836

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.

2 participants