-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Issue] Validate tar archive extraction paths #40838
Copy link
Copy link
Open
Labels
Issue: ready for confirmationReported on 2.4.xIndicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Metadata
Metadata
Assignees
Labels
Issue: ready for confirmationReported on 2.4.xIndicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Ready for Confirmation
This issue is automatically created based on existing pull request: #40821: Validate tar archive extraction paths
Summary
Tighten Magento framework TAR extraction so archive entries cannot write outside the configured extraction destination.
The TAR extractor builds output paths by concatenating the destination directory with the archive member name. A crafted member such as ../outside.txt can escape the destination and write elsewhere on disk
during extraction. Symlink entries also lacked target containment checks.
Changes
Validation
Note
I could not run PHPUnit in this clone because vendor/bin/phpunit is not installed.