This issue was addressed with improved file handling. This issue is fixed in macOS Sonoma 14.4, macOS Monterey 12.7.4, macOS Ventura 13.6.5. An app may be able to access sensitive user data.
https://support.apple.com/en-us/HT214085
https://support.apple.com/en-us/HT214084
https://support.apple.com/en-us/HT214083
http://seclists.org/fulldisclosure/2024/Mar/23