The issue was addressed with improved checks. This issue is fixed in macOS Sonoma 14.5, iOS 16.7.8 and iPadOS 16.7.8, Safari 17.5, iOS 17.5 and iPadOS 17.5, watchOS 10.5, tvOS 17.5, visionOS 1.2. Processing a file may lead to unexpected app termination or arbitrary code execution.
https://support.apple.com/en-us/120906
https://support.apple.com/en-us/120905
https://support.apple.com/en-us/120903
https://support.apple.com/en-us/120902
https://support.apple.com/en-us/120901