This issue was addressed with improved checks. This issue is fixed in iOS 15.7.1 and iPadOS 15.7.1, tvOS 16. An app may be able to execute arbitrary code with kernel privileges.
Apple Security Advisory 2022-10-27-1 - iOS 15.7.1 and iPadOS 15.7.1 addresses buffer overflow, code execution, and out of bounds write vulnerabilities.