Relative Symlink Path Traversal in libFLAC Leading to Local File Overwrite
A flaw was found in flac. When a size-changing metadata edit is performed on a FLAC file that is a symbolic link with a relative target, libFLAC renames the edited temporary file to the raw link-target string, which the operating system resolves against the process working directory instead of the directory containing the link. An attacker who can place a relative symlink and a co-located FLAC file in a location a victim will edit could use this to cause the victim's routine metadata edit to overwrite files relative to the victim's working directory, destroying the original content.