CVE-2026-11940: pass filter_function through TarFile.extract() so the hardlink-extraction fallback is filtered (prerequisite)
CVE-2026-11940: filter the symlink at the hardlink's own path so a hardlink to a deeper symlink cannot recreate it at a shallower path and escape the destination directory
CVE-2026-82049: resolve a hardlink's target with os.path.realpath() so extracting a hard link to a symlink cannot relocate that symlink and expose or modify files outside the destination