Skip to content

Fix Zip Slip vulnerability in file extraction utility #5422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

simei2k
Copy link

@simei2k simei2k commented May 10, 2025

Identify the Bug or Feature request

Fix Zip Slip vulnerability in file extraction utility
#5421

Description of the Change

Provide path validation, ensuring files can only be extracted within the intended path directory/ Path canonicalisation to prevent bypass techniques. Added try-with-resources to ensure proper stream colsure, preventing resource leaks. The code extracts content only after verifying that the path is safe.

This vulnerability was also found in YANG-DB/yang-db@4c32a32 and fixed henceforth,

Documentation Notes

  1. https://nvd.nist.gov/vuln/detail/cve-2018-1002200
  2. YANG-DB/yang-db@4c32a32

Release Notes

Fix Zip Slip vulnerability in file extraction utility


This change is Reviewable

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