This advisory announces vulnerabilities in the following Jenkins deliverables:
Users with Overall/Read permission were able use the
list-plugins CLI command and view the About Jenkins page to list all installed plugins.
Use of the
list-plugins CLI command and access to the About Jenkins page now require Overall/Administer permission.
The built-in Jenkins user database optionally allows user registration. This feature did not properly sanitize user names, allowing registration of user names containing control characters.
This could be used to confuse administrators (appearing to be a different user) while preventing deletion of such users through the UI.
User registration in the built-in Jenkins user database now limits user names to those containing alphanumeric, dash, and underscore characters.
Administrators can customize this restriction by setting the
hudson.security.HudsonPrivateSecurityRealm.ID_REGEX system property to a regular expression that will be used instead to determine whether a given user name is valid.
The agent to controller security subsystem ensures that the Jenkins controller is protected from maliciously configured agents. Learn more.
A path traversal vulnerability allowed agents to escape whitelisted directories to read and write to files they should not be able to access.
Paths are now normalized before performing the access check to ensure they don’t escape allowed directories.
The form validation code for a tool installer improperly checked permissions, allowing any user with Overall/Read permission to submit a HTTP GET request to any user specified URL, and learn whether the response was successful (HTTP 200) or not.
Additionally, this functionality did not require POST requests be used, thereby allowing the above to be performed without direct access to Jenkins via Cross-Site Request Forgery attacks.
The affected form validation code now properly checks permissions, and requires that POST requests be sent to prevent CSRF attacks.
Gitlab Hook Plugin does not encrypt the Gitlab API token used to access Gitlab. This can be used by users with Jenkins controller file system access to obtain GitHub credentials.
Additionally, the Gitlab API token round-trips in its plaintext form, and is displayed in a regular text field to users with Overall/Administer permission. This exposes the API token to people viewing a Jenkins administrator’s screen, browser extensions, cross-site scripting vulnerabilities, etc.
As of publication of this advisory, there is no fix.
Black Duck Hub Plugin did not perform permission checks for its
/descriptorByName/com.blackducksoftware.integration.hub.jenkins.PostBuildHubScan/config.xml API endpoint.
This allowed any user with Overall/Read permission to both read and write the plugin configuration XML.
Black Duck Hub Plugin 3.1.0 and newer requires Overall/Administer permission to access this API.
Black Duck Hub Plugin’s
/descriptorByName/com.blackducksoftware.integration.hub.jenkins.PostBuildHubScan/config.xml API endpoint was affected by an XML External Entity (XXE) processing vulnerability.
This allowed an attacker with Overall/Read access to have Jenkins parse a maliciously crafted file that uses external entities for extraction of secrets from the Jenkins controller, server-side request forgery, or denial-of-service attacks.
Black Duck Hub Plugin 4.0.0 and newer no longer processes XML External Entities in XML documents submitted to this endpoint.
Groovy Postbuild Plugin did not properly escape badge content from user input, resulting in a stored cross-site scripting vulnerability.
Groovy Postbuild Plugin 2.4 now properly escapes badge content from user input.
These versions include fixes to the vulnerabilities described above. All prior versions are considered to be affected by these vulnerabilities unless otherwise indicated.
As of publication of this advisory, no fixes are available for the following plugins:
The Jenkins project would like to thank the reporters for discovering and reporting these vulnerabilities: