pip would treat console_scripts and gui_scripts as paths instead of file names without sanitizing the resolved absolute path to the installation directory, leading to entry points being installed outside the installation directory.
Exploitability
AV:LAC:LAT:PPR:LUI:AVulnerable System
VC:NVI:HVA:NSubsequent System
SC:NSI:NSA:N4.1/CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N