This issue was addressed with improved validation of symlinks. This issue is fixed in macOS Sonoma 14.5, macOS Ventura 13.6.7, macOS Monterey 12.7.5. An app may be able to modify protected parts of the file system.
https://support.apple.com/kb/HT214107
https://support.apple.com/kb/HT214106
https://support.apple.com/kb/HT214105
https://support.apple.com/en-us/HT214107