This issue was addressed by removing the vulnerable code. This issue is fixed in macOS Ventura 13.7, visionOS 2, iOS 18 and iPadOS 18, macOS Sonoma 14.7, macOS Sequoia 15. An app may be able to overwrite arbitrary files.
https://support.apple.com/en-us/121250
https://support.apple.com/en-us/121249
https://support.apple.com/en-us/121247