A logic issue was addressed with improved validation. This issue is fixed in macOS Big Sur 11.7.9, macOS Monterey 12.6.8, macOS Ventura 13.5. A sandboxed process may be able to circumvent sandbox restrictions.
https://support.apple.com/kb/HT213845
https://support.apple.com/kb/HT213844
https://support.apple.com/kb/HT213843
https://support.apple.com/en-us/HT213845