The vulnerability exists in the bind method of the hudson.plugins.active_directory.ActiveDirectorySecurityRealm$DescriptorImpl class. Before the patch, this method was configured to follow LDAP referrals by default by setting Context.REFERRAL to "follow". This behavior could be exploited by an attacker to force the Jenkins controller to connect to a malicious RMI server, leading to Remote Code Execution through deserialization of untrusted data. The provided patch addresses this by changing the default value of the hudson.plugins.active_directory.referral.ignore system property to "true", which in turn sets Context.REFERRAL to "ignore". The analysis of the commit a62fcfb343e232ef87b749c2c0f19bde7112db40 clearly shows the removal of the vulnerable code that defaulted to following referrals and its replacement with code that defaults to ignoring them. The vulnerable function is hudson.plugins.active_directory.ActiveDirectorySecurityRealm$DescriptorImpl.bind as it is the function that establishes the LDAP connection with the insecure setting.