CVE-2025-64145: Jenkins ByteGuard Build Actions Plugin does not mask API tokens displayed on the job configuration form
4.3
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| io.jenkins.plugins:byteguard-build-actions | maven | <= 1.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability lies in the io.jenkins.plugins.BytegaurdActionBuilder class, which handles the configuration for the build step. The core of the issue is the handling of the token field, which is used for authentication with the ByteGuard API.
-
Unencrypted Storage: The
tokenis declared as aprivate final String. When a user configures a job using this build step, Jenkins uses the@DataBoundConstructorto instantiate theBytegaurdActionBuilder. The provided token is stored in thetokenfield. Because the field is a standardStringand not ahudson.util.Secret, Jenkins serializes it directly into the job'sconfig.xmlfile in plain text. Anyone with access to the Jenkins controller's file system or withItem/ExtendedReadpermission can view this sensitive credential. -
Unmasked Credential in UI: The
getToken()getter method returns the token as a plainString. This getter is used by the associatedconfig.jellyview file to render the configuration form. A standard<f:textbox>field bound to this getter will display the token in cleartext. This allows any user who can access the job's configuration page to see the API token, increasing the risk of accidental exposure or malicious capture.
The fix for this type of vulnerability typically involves changing the token field type from String to hudson.util.Secret and updating the constructor and getter accordingly. The corresponding Jelly file would also be updated to use an <f:password/> field, which automatically handles masking in the UI and encryption on the backend. As no fix is available, the identified functions represent the current vulnerable implementation.
Vulnerable functions
io.jenkins.plugins.BytegaurdActionBuilder.BytegaurdActionBuildersrc/main/java/io/jenkins/plugins/BytegaurdActionBuilder.java
io.jenkins.plugins.BytegaurdActionBuilder.getTokensrc/main/java/io/jenkins/plugins/BytegaurdActionBuilder.java