
===================================================================                              CERT-Renater

                    Note d'Information No. 2023/VULN295

_____________________________________________________________________

DATE                : 06/09/2023

HARDWARE PLATFORM(S): /

OPERATING SYSTEM(S): Systems running Assembla Auth Plugin for Jenkins,
                        AWS CodeCommit Trigger Plugin for Jenkins,
                                 Azure AD Plugin for Jenkins,
                    Bitbucket Push and Pull Request Plugin for Jenkins,
                        Frugal Testing Plugin for Jenkins,
                        Google Login Plugin for Jenkins,
                        Ivy Plugin,
                        Job Configuration History Plugin,
                        Pipeline Maven Integration Plugin,
                        Qualys Container Scanning Connector Plugin,
                        SSH2 Easy Plugin for Jenkins,
                        TAP Plugin for Jenkins.

====================================================================https://www.jenkins.io/security/advisory/2023-09-06/
_____________________________________________________________________

  Jenkins Security Advisory 2023-09-06

This advisory announces vulnerabilities in the following Jenkins
deliverables:


     Assembla Auth Plugin
     AWS CodeCommit Trigger Plugin
     Azure AD Plugin
     Bitbucket Push and Pull Request Plugin
     Frugal Testing Plugin
     Google Login Plugin
     Ivy Plugin
     Job Configuration History Plugin
     Pipeline Maven Integration Plugin
     Qualys Container Scanning Connector Plugin
     SSH2 Easy Plugin
     TAP Plugin


Descriptions

Path traversal allows exploiting XSS vulnerability in Job
Configuration History Plugin

SECURITY-3233 / CVE-2023-41930 (path traversal), CVE-2023-41931 (XSS)
Severity (CVSS): High
Affected plugin: jobConfigHistory
Description:

Job Configuration History Plugin 1227.v7a_79fc4dc01f and earlier
does not restrict a name query parameter when rendering a history
entry. This allows attackers to have Jenkins render a manipulated
configuration history that was not created by the plugin.

The history view does not property sanitize or escape the timestamp
value from history entries when rendering a history entry. This
typically isn’t a problem, as the value is numeric in genuine history
entries. Combined with the path traversal vulnerability, this results
in a stored cross-site scripting (XSS) vulnerability exploitable by
attackers with the ability to create a file on the controller
(e.g., archived artifacts).

Job Configuration History Plugin 1229.v3039470161a_d restricts the
name query parameter when rendering a history entry, and escapes the
timestamp value from history entries on the history view.

Path traversal allows exploiting XXE vulnerability in Job
Configuration History Plugin
SECURITY-3235 / CVE-2023-41932 (path traversal), CVE-2023-41933 (XXE)
Severity (CVSS): High
Affected plugin: jobConfigHistory

Description:

Job Configuration History Plugin 1227.v7a_79fc4dc01f and earlier
does not restrict timestamp query parameters in multiple endpoints.
This allows attackers with Job Config History/DeleteEntry
permission to delete attacker-specified directories on the
Jenkins controller file system as long as they contain a file
called history.xml.

Additionally, Job Configuration History Plugin 1227.v7a_79fc4dc01f
and earlier does not configure its XML parser to prevent XML
external entity (XXE) attacks. This allows attackers with
Item/Configure permission to have Jenkins parse a crafted
XML document that uses external entities for extraction of secrets
from the Jenkins controller or server-side request forgery.

Job Configuration History Plugin 1229.v3039470161a_d restricts
timestamp query parameters in the affected endpoints, and
disables external entity resolution for its XML parser.


Improper masking of credentials in Pipeline Maven Integration
Plugin
SECURITY-3257 / CVE-2023-41934
Severity (CVSS): Medium
Affected plugin: pipeline-maven

Description:

Pipeline Maven Integration Plugin integrates with Config File
Provider Plugin to specify custom Maven settings, including
credentials for authentication.

Pipeline Maven Integration Plugin 1330.v18e473854496 and earlier
does not properly mask (i.e., replace with asterisks) usernames
of credentials specified in custom Maven settings in Pipeline
build logs if "Treat username as secret" is checked.

Pipeline Maven Integration Plugin 1331.v003efa_fd6e81 masks
usernames of credentials specified in custom Maven settings
files in Pipeline build logs.


Non-constant time nonce comparison in Azure AD Plugin
SECURITY-3227 / CVE-2023-41935
Severity (CVSS): Low
Affected plugin: azure-ad

Description:

Azure AD Plugin 396.v86ce29279947 and earlier, except
378.380.v545b_1154b_3fb_, does not use a constant-time
comparison when checking whether the provided and expected
CSRF protection nonce are equal.

This could potentially allow attackers to use statistical methods
to obtain a valid nonce.

Azure AD Plugin 397.v907382dd9b_98 uses a constant-time comparison
when validating the nonce.


Non-constant time token comparison in Google Login Plugin
SECURITY-3228 / CVE-2023-41936
Severity (CVSS): Low
Affected plugin: google-login

Description:

Google Login Plugin 1.7 and earlier does not use a constant-time
comparison when checking whether the provided and expected token
are equal.

This could potentially allow attackers to use statistical methods
to obtain a valid token.

Google Login Plugin 1.8 uses a constant-time comparison when
validating the token.


SSRF vulnerability in Bitbucket Push and Pull Request Plugin allows
capturing credentials
SECURITY-3165 / CVE-2023-41937
Severity (CVSS): Medium
Affected plugin: bitbucket-push-and-pull-request

Description:

Bitbucket Push and Pull Request Plugin provides a webhook endpoint
at /bitbucket-hook/ to receive webhook notifications.

When acting on these notifications, Bitbucket Push and Pull Request
Plugin 2.4.0 through 2.8.3 (both inclusive) trusts values provided
in the webhook payload, including certain URLs, and uses configured
Bitbucket credentials to connect to those URLs. This allows attackers
to capture Bitbucket credentials stored in Jenkins by sending a
crafted webhook payload.

	Successful exploitation requires that a build is triggered.
This is the case when the repository has changed since the previous
build, or the option "Trigger also if nothing has changed in the repo"
is checked.

Bitbucket Push and Pull Request Plugin 2.8.4 connects to the Bitbucket
endpoint configured for the job when acting on a webhook notification.


Incorrect permission checks in Qualys Container Scanning Connector
Plugin
SECURITY-3018 / CVE pending
Severity (CVSS): High
Affected plugin: qualys-cs

Description:

Qualys Container Scanning Connector Plugin 1.6.2.6 and earlier does
not correctly perform a permission check in multiple HTTP endpoints.

This allows attackers with global Item/Configure permission (while
lacking Item/Configure permission on any particular job) to do the
following:

     Enumerate credentials IDs of credentials stored in Jenkins. Those
can be used as part of an attack to capture the credentials using
another vulnerability.

     Connect to an attacker-specified webserver using attacker-specified
credentials IDs obtained through another method, capturing credentials
stored in Jenkins.

Qualys Container Scanning Connector Plugin 1.6.2.7 requires global
Overall/Administer permission, or Item/Configure permission on a job,
to access the affected endpoint.


XXE vulnerability in Ivy Plugin
SECURITY-2924 / CVE-2022-46751
Severity (CVSS): High
Affected plugin: ivy

Description:

Ivy Plugin 2.5 and earlier bundles versions of Apache Ivy vulnerable
to CVE-2022-46751.

This allows attackers able to control the input file for the "Trigger
the build of other projects based on the Ivy dependency management
system" post-build step to have Jenkins parse a crafted XML document
that uses external entities for extraction of secrets from the Jenkins
controller or server-side request forgery.

As of publication of this advisory, there is no fix. Learn why we
announce this.


CSRF vulnerability in Ivy Plugin
SECURITY-3093 / CVE-2023-41938
Severity (CVSS): Medium
Affected plugin: ivy

Description:

Ivy Plugin 2.5 and earlier does not require POST requests for an HTTP
endpoint, resulting in a cross-site request forgery (CSRF) vulnerability.

This vulnerability allows attackers to delete disabled modules.

As of publication of this advisory, there is no fix. Learn why we
announce this.


Disabled permissions can be granted by SSH2 Easy Plugin
SECURITY-3064 / CVE-2023-41939
Severity (CVSS): Medium
Affected plugin: ssh2easy

Description:

SSH2 Easy Plugin 1.4 and earlier does not verify that permissions
configured to be granted are enabled. This may allow users formerly
granted (typically optional permissions, like Overall/Manage) to access
functionality they’re no longer entitled to.

	As a workaround, administrators can save the permission
configuration after disabling a permission, as that will overwrite any
permission assignments of disabled permissions.

The affected features have been removed without replacement in SSH2
Easy Plugin 1.6.


Stored XSS vulnerability in TAP Plugin
SECURITY-3190 / CVE-2023-41940
Severity (CVSS): High
Affected plugin: tap

Description:

TAP Plugin 2.3 and earlier does not escape TAP file contents.

This results in a stored cross-site scripting (XSS) vulnerability
exploitable by attackers able to control TAP file contents.

As of publication of this advisory, there is no fix. Learn why we
announce this.


Missing permission check in AWS CodeCommit Trigger Plugin allows
enumerating credentials IDs
SECURITY-3101 (1) / CVE-2023-41941
Severity (CVSS): Medium
Affected plugin: aws-codecommit-trigger

Description:

AWS CodeCommit Trigger Plugin 3.0.12 and earlier does not perform a
permission check in an HTTP endpoint.

This allows attackers with Overall/Read permission to enumerate
credentials IDs of AWS credentials stored in Jenkins. Those can be
used as part of an attack to capture the credentials using another
vulnerability.

As of publication of this advisory, there is no fix. Learn why we
announce this. CSRF vulnerability and missing permission check in
AWS CodeCommit Trigger Plugin


SECURITY-3101 (2) / CVE-2023-41942 (CSRF), CVE-2023-41943
(permission check)
Severity (CVSS): Medium
Affected plugin: aws-codecommit-trigger

Description:

AWS CodeCommit Trigger Plugin 3.0.12 and earlier does not perform a
permission check in an HTTP endpoint.

This allows attackers with Overall/Read permission to clear the SQS
queue.

Additionally, this endpoint does not require POST requests, resulting
in a cross-site request forgery (CSRF) vulnerability.

As of publication of this advisory, there is no fix. Learn why we
announce this.


HTML injection vulnerability in AWS CodeCommit Trigger Plugin
SECURITY-3102 / CVE-2023-41944
Severity (CVSS): Medium
Affected plugin: aws-codecommit-trigger
Description:

AWS CodeCommit Trigger Plugin 3.0.12 and earlier does not escape the
queue name parameter passed to a form validation URL, when rendering
an error message.

This results in an HTML injection vulnerability.
	Since Jenkins 2.275 and LTS 2.263.2, a security hardening for
form validation responses prevents JavaScript execution, so no scripts
can be injected.

As of publication of this advisory, there is no fix. Learn why we
announce this.

Disabled permissions granted by Assembla Auth Plugin
SECURITY-3065 / CVE-2023-41945
Severity (CVSS): Medium
Affected plugin: assembla-auth

Description:

Assembla Auth Plugin provides an authorization strategy that defines
four levels of access to Jenkins, based on the corresponding
permissions in Assembla spaces: ALL, EDIT, VIEW, and NONE.

Assembla Auth Plugin 1.14 and earlier does not verify that the
permissions it grants are enabled. This results in users with EDIT
permissions to be granted Overall/Manage and Overall/SystemRead
permissions, even if those permissions are disabled and should not
be granted.
	Additionally, the plugin also grants the deprecated
permissions Overall/RunScripts, Overall/UploadPlugins and
Overall/ConfigureUpdateCenter to users with EDIT access. These
permissions allow arbitrary code execution through various means in
Jenkins before 2.222. Additionally, plugins not yet adapted to the
changes in Jenkins 2.222 may also provide access to sensitive
features to users with these permissions.

As of publication of this advisory, there is no fix. Learn why we
announce this.
CSRF vulnerability and missing permission checks in Frugal Testing
Plugin
SECURITY-3082 / CVE-2023-41946 (CSRF), CVE-2023-41947 (permission
check)
Severity (CVSS): Medium
Affected plugin: frugal-testing

Description:

Frugal Testing Plugin 1.1 and earlier does not perform permission
checks in several HTTP endpoints.

This allows attackers with Overall/Read permission to do the
following:

     Connect to Frugal Testing using attacker-specified username and
password.

     Retrieve test IDs and names from Frugal Testing, if a valid
credential corresponds to the attacker-specified username.

Additionally, these endpoints do not require POST requests,
resulting in a cross-site request forgery (CSRF) vulnerability.

As of publication of this advisory, there is no fix. Learn why
we announce this.


Severity

     SECURITY-2924: High
     SECURITY-3018: High
     SECURITY-3064: Medium
     SECURITY-3065: Medium
     SECURITY-3082: Medium
     SECURITY-3093: Medium
     SECURITY-3101 (1): Medium
     SECURITY-3101 (2): Medium
     SECURITY-3102: Medium
     SECURITY-3165: Medium
     SECURITY-3190: High
     SECURITY-3227: Low
     SECURITY-3228: Low
     SECURITY-3233: High
     SECURITY-3235: High
     SECURITY-3257: Medium


Affected Versions

     Assembla Auth Plugin up to and including 1.14
     AWS CodeCommit Trigger Plugin up to and including 3.0.12
     Azure AD Plugin up to and including 396.v86ce29279947
     Bitbucket Push and Pull Request Plugin up to and including 2.8.3
     Frugal Testing Plugin up to and including 1.1
     Google Login Plugin up to and including 1.7
     Ivy Plugin up to and including 2.5
     Job Configuration History Plugin up to and including 
1227.v7a_79fc4dc01f
     Pipeline Maven Integration Plugin up to and including 
1330.v18e473854496
     Qualys Container Scanning Connector Plugin up to and including 1.6.2.6
     SSH2 Easy Plugin up to and including 1.4
     TAP Plugin up to and including 2.3

Fix

     Azure AD Plugin should be updated to version 397.v907382dd9b_98 or 
378.380.v545b_1154b_3fb_
     Bitbucket Push and Pull Request Plugin should be updated to version 
2.8.4
     Google Login Plugin should be updated to version 1.8
     Job Configuration History Plugin should be updated to version 
1229.v3039470161a_d
     Pipeline Maven Integration Plugin should be updated to version 
1331.v003efa_fd6e81
     Qualys Container Scanning Connector Plugin should be updated to 
version 1.6.2.7
     SSH2 Easy Plugin should be updated to version 1.6

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:

     Assembla Auth Plugin
     AWS CodeCommit Trigger Plugin
     Frugal Testing Plugin
     Ivy Plugin
     TAP Plugin

Learn why we announce these issues.


Credit

The Jenkins project would like to thank the reporters for discovering
and reporting these vulnerabilities:

     Andrea Chiera, CloudBees, Inc. for SECURITY-3190, SECURITY-3233, 
SECURITY-3235
     CC Bomber, Kitri BoB for SECURITY-2924
     Kevin Guerroudj, CloudBees, Inc. for SECURITY-3093, SECURITY-3101 
(1), SECURITY-3101 (2), SECURITY-3102
     Kevin Guerroudj, CloudBees, Inc. and Yaroslav Afenkin, CloudBees, 
Inc. for SECURITY-3064, SECURITY-3065
     Tony Torralba (@atorralba), GitHub Security Lab and Alvaro Muñoz 
(@pwntester), GitHub Security Lab for SECURITY-3165
     Yaroslav Afenkin, CloudBees, Inc. for SECURITY-3018, SECURITY-3082, 
SECURITY-3227, SECURITY-3228, SECURITY-3257


========================================================+ CERT-RENATER        |    tel : 01-53-94-20-44         +
+ 23/25 Rue Daviel    |    fax : 01-53-94-20-41         +
+ 75013 Paris         |   email:cert@support.renater.fr +
=======================================================