You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/10/03 06:21:00 UTC

[jira] [Commented] (OFBIZ-13633) Always protect FileUtil.unzipFileToFolder against zip slip

    [ https://issues.apache.org/jira/browse/OFBIZ-13633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18122166#comment-18122166 ] 

ASF subversion and git services commented on OFBIZ-13633:
---------------------------------------------------------

Commit 8f46f1e119e6c29da63eaece5d5107e406e60410 in ofbiz-framework's branch refs/heads/trunk from Mridul Pathak
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=8f46f1e119 ]

Improved: Always protect FileUtil.unzipFileToFolder against zip slip (OFBIZ-13633)

FileUtil.unzipFileToFolder() had a handleZipSlip parameter, and when it was false the entries were written without the check that FileUtil.newFile() applies. The parameter is removed, so the check is always applied. The only caller was a unit test, which is updated.


> Always protect FileUtil.unzipFileToFolder against zip slip
> ----------------------------------------------------------
>
>                 Key: OFBIZ-13633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13633
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework/base
>    Affects Versions: Upcoming Branch, 24.09.07
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Minor
>
> {{FileUtil.unzipFileToFolder(File, String, boolean)}} takes a {{handleZipSlip}} flag, and when it is false the entry names are used to create files without the check that {{FileUtil.newFile}} applies. The only caller is a unit test. Related to open CodeQL alerts.
> h3. Proposal
> Remove the {{handleZipSlip}} parameter so the check is always applied, and update the unit test call. This changes a public method signature; no other caller exists in the framework or the plugins.
> h3. Release branch
> release24.09 has the same method. A backport is planned.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)