A use after free vulnerability exists in curl <7.87.0. Curl can be asked to *tunnel* virtually all protocols it supports through an HTTP proxy. HTTP proxies can (and often do) deny such tunnel operations. When getting denied to tunnel the specific protocols SMB or TELNET, curl would use a heap-allocated struct after it had been freed, in its transfer shutdown code path.
https://support.apple.com/kb/HT213670
https://security.netapp.com/advisory/ntap-20230214-0002/
https://security.gentoo.org/glsa/202310-12