The vulnerability, CVE-2026-48916, exists in the Jenkins LDAP Plugin because it was configured to automatically follow LDAP referrals. This behavior could be exploited by an attacker with control over the LDAP server or the ability to perform a machine-in-the-middle attack. By sending a crafted LDAP referral, the attacker could force the Jenkins controller to connect to an arbitrary RMI URL. If the Jenkins classpath contained suitable 'gadgets', this could lead to the deserialization of a malicious payload and result in Remote Code Execution (RCE).
The analysis of the fixing commit d3a4e5e4ec989f15b6b5c5ade541747fc7362126 reveals that the insecure default behavior was hardcoded in the jenkins.security.plugins.ldap.LDAPConfiguration class. Specifically, two methods were identified as being responsible for this configuration:
doCheckServer: This method, used for validating LDAP settings in the UI, set java.naming.referral to follow.
createApplicationContext: This method, which sets up the context for actual user authentication, also configured the system to follow referrals.
The patch remediates the vulnerability by changing the default value for java.naming.referral from follow to ignore in both methods. This prevents the Jenkins instance from following referrals unless explicitly re-enabled by an administrator who understands the security implications. Therefore, these two functions are the key indicators of the vulnerability at runtime.