This is an automated email from the ASF dual-hosted git repository.

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new 37d411e8c Clarify ArchiveEntry.resolveIn lexical validation limits 
(f017)
37d411e8c is described below

commit 37d411e8c7656f4bd5b15ef8dade7660aaf19575
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Dec 4 21:51:45 2026 +0000

    Clarify ArchiveEntry.resolveIn lexical validation limits (f017)
---
 src/changes/changes.xml                                           | 3 ++-
 .../java/org/apache/commons/compress/archivers/ArchiveEntry.java  | 8 +++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 6e1166530..91f249505 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UT[TAR] Account for sparse maps and unre-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -229,6 +229,7 @@ The <action> type attribute can be add,update,fix,remove.
       <action type="fix" dev="ggregory" due-to="Gary Gregory">ExactMath now 
throws ArchiveException instead of 
IllegalArgumetException/IllegalStateException.</action>
       <action type="fix" dev="ggregory">[Compressors] Default 
CompressorStreamFactory constructors without an explicit memory limit to 1 GiB 
for Z, LZMA, XZ, and Pack200; explicit -1 retains unlimited operation.</action>
       <action type="fix" dev="ggregory">[7-Zip] Avoid integer overflow when 
converting kilobyte memory limits to kibibytes.</action>
+      <action type="fix" dev="ggregory" due-to="Claude Security, Gary 
Gregory">Clarify that ArchiveEntry.resolveIn(Path) validates paths lexically 
and does not protect against symbolic or hard links.</action>
       <!-- ADD -->
       <action type="add" dev="ggregory" due-to="Gary Gregory">Add 
MemoryLimitException.MemoryLimitException(long, long).</action>
       <action type="add" dev="ggregory" due-to="Gary Gregory">Add 
CompressException.CompressException(String, Object...).</action>
diff --git 
a/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java 
b/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java
index 811ac501c..f0cae60b1 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java
@@ -67,9 +67,15 @@ public interface ArchiveEntry {
     /**
      * Resolves this entry in the given parent Path.
      *
+     * <p>
+     * This method performs a lexical check only. It does not access the file 
system or validate archive link targets. Symbolic links in parent directories or
+     * at the output path, and hard links, can cause extraction to affect 
files outside the intended directory. Callers are responsible for ensuring safe
+     * extraction, including accounting for links already present in the 
destination.
+     * </p>
+     *
      * @param parentPath The {@link Path#resolve(Path)} receiver.
      * @return A resolved and normalized Path.
-     * @throws IOException if this method detects a Zip slip.
+     * @throws IOException if the resolved and normalized path does not start 
with {@code parentPath}.
      * @since 1.26.0
      */
     default Path resolveIn(final Path parentPath) throws IOException {

Reply via email to