A use-after-free vulnerability introduced in glibc upstream version 2.14 was found in the way the tilde expansion was carried out. Directory paths containing an initial tilde followed by a valid username were affected by this issue. A local attacker could exploit this flaw by creating a specially crafted path that, when processed by the glob function, would potentially lead to arbitrary code execution. This was fixed in version 2.32.
https://usn.ubuntu.com/4416-1/
https://sourceware.org/git/gitweb.cgi?p=glibc.git%3Bh=ddc650e9b3dc916eab417ce9f79e67337b05035c
https://sourceware.org/bugzilla/show_bug.cgi?id=25414
https://security.netapp.com/advisory/ntap-20200511-0005/
https://security.gentoo.org/glsa/202101-20
https://lists.debian.org/debian-lts-announce/2022/10/msg00021.html