SABnzbd before 5.2.0 contains a path traversal vulnerability in the Sorter that allows attackers to write files outside the Complete folder via crafted propername, episodename or job name (%dn) values. Attackers can supply a malicious NZB with '...' sequences that collapse to '..' after single-pass replacement, moving downloaded files into arbitrary directories writable by SABnzbd.
https://github.com/sabnzbd/sabnzbd/security/advisories/GHSA-727m-c877-c8gf
https://github.com/sabnzbd/sabnzbd/pull/3688
https://github.com/sabnzbd/sabnzbd/commit/c90ab4ee593220d58b9e849269fac846517b13bc
https://github.com/sabnzbd/sabnzbd/blob/5.1.3/sabnzbd/sorting.py#L400-L402
https://github.com/sabnzbd/sabnzbd/blob/5.1.3/sabnzbd/filesystem.py#L325-L348