diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass
index 4aed64e27f..c50bcf673d 100644
--- a/meta/classes-recipe/image_types.bbclass
+++ b/meta/classes-recipe/image_types.bbclass
@@ -385,5 +385,9 @@ DEPLOYABLE_IMAGE_TYPES ?= "hddimg iso"
 # images that will not be built at do_rootfs time: vmdk, vhd, vhdx, vdi, qcow2, hddimg, iso, etc.
 IMAGE_TYPES_MASKED ?= ""
 
+# Minimal tar version 1.35 is needed as it has fixed bugs for storing ACL entries in textual representation
+# and is able to extract files with xattrs that are read-only; this needs to work only if acl or xattr are turned on
+DEPENDS:append = " ${@bb.utils.contains_any('DISTRO_FEATURES', 'acl xattr', 'tar-replacement-native', '', d)}"
 # bmap requires python3 to be in the PATH
-EXTRANATIVEPATH += "${@'python3-native' if d.getVar('IMAGE_FSTYPES').find('.bmap') else ''}"
+# IMAGE_CMD_TAR requires tar to be in the PATH
+EXTRANATIVEPATH += "${@'python3-native' if d.getVar('IMAGE_FSTYPES').find('.bmap') else ''} ${@bb.utils.contains_any('DISTRO_FEATURES', 'acl xattr', 'tar-native', '', d)}"
