The vulnerability, CVE-2025-67638, involves the storage and display of build authorization tokens in plaintext in Jenkins. The analysis of the patch commit 4710d65339251aaf1d1599f19545db99be24d981 reveals the exact locations of the vulnerability.
The root cause lies within the hudson.model.BuildAuthorizationToken class, which previously handled the token as a standard java.lang.String.
-
Cleartext Storage: The inner class hudson.model.BuildAuthorizationToken.ConverterImpl is used by XStream to serialize the token to a job's config.xml file. Its toString method directly returned the plaintext token string, causing it to be saved unencrypted on disk. An attacker with filesystem access could read these tokens.
-
Cleartext Display: The hudson.model.BuildAuthorizationToken.getToken() method returned the plaintext token. This method was called by the job configuration UI (config.jelly), which displayed the token in a simple textbox. This allowed any user with Job/Read or Job/Configure permissions to view the token, increasing the risk of unauthorized capture.
The patch remediates this by replacing the String field with hudson.util.Secret, which handles encryption and prevents accidental exposure. The ConverterImpl.toString method was updated to serialize the encrypted value, and the UI was changed from a <f:textbox> to <f:password>, effectively masking the token and preventing its display.