The vulnerability, a stored Cross-Site Scripting (XSS) issue (CVE-2025-53658), exists because the Jenkins Applitools Eyes Plugin did not properly validate or sanitize the 'Applitools URL' before saving it and rendering it on a build page. An attacker with 'Item/Configure' permissions could set a specially crafted URL containing a JavaScript payload.
The patch commit b8eaadc5e6f35603406efec11276fa7ea0dddd7d addresses this by introducing proper input validation. The analysis of this commit points to three key functions:
-
com.applitools.jenkins.ApplitoolsProjectConfigProperty.ApplitoolsProjectConfigProperty (Constructor): This was the initial point of entry for the untrusted data. It took the user's URL and stored it directly.
-
com.applitools.jenkins.ApplitoolsProjectConfigProperty.setServerURL: This method was responsible for setting the server URL and, like the constructor, failed to validate the input before storing it.
-
com.applitools.jenkins.ApplitoolsBuildWrapper.DescriptorImpl.validURL: This validation function was the core of the problem. Its original implementation was too permissive, allowing malicious strings to be considered valid URLs. The fix completely rewrites this function, adding the org.owasp.encoder library to explicitly check for and reject URLs containing characters used in XSS attacks.
When the vulnerability is exploited, a user saves a job configuration, which triggers calls to the ApplitoolsProjectConfigProperty constructor and setServerURL method. These methods, in turn, would have used the weak validURL function. Therefore, these three functions would appear in a runtime profile during the exploitation of this vulnerability.