This issue was addressed with improved checks. This issue is fixed in iOS 16.2 and iPadOS 16.2, macOS Monterey 12.6.2, macOS Ventura 13.1, iOS 15.7.2 and iPadOS 15.7.2. An app may be able to break out of its sandbox.
https://support.apple.com/en-us/HT213532
https://support.apple.com/en-us/HT213531
https://support.apple.com/en-us/HT213533
https://support.apple.com/en-us/HT213530
http://seclists.org/fulldisclosure/2022/Dec/24
http://seclists.org/fulldisclosure/2022/Dec/23