This issue was addressed with improved environment sanitization. This issue is fixed in macOS Ventura 13.6.7, macOS Monterey 12.7.5, iOS 16.7.8 and iPadOS 16.7.8, tvOS 17.5, iOS 17.5 and iPadOS 17.5, watchOS 10.5, macOS Sonoma 14.5. An app may be able to access sensitive user data.
https://support.apple.com/kb/HT214107
https://support.apple.com/kb/HT214106
https://support.apple.com/kb/HT214105
https://support.apple.com/kb/HT214104
https://support.apple.com/kb/HT214102
https://support.apple.com/kb/HT214101
https://support.apple.com/kb/HT214100
https://support.apple.com/en-us/HT214107
https://support.apple.com/en-us/HT214106
https://support.apple.com/en-us/HT214105
https://support.apple.com/en-us/HT214104
https://support.apple.com/en-us/HT214102