<figure class="wp-block-image size-full"><img src="https://smartango.com/wp-content/uploads/2025/09/image.png" alt="" class="wp-image-703"/></figure>
<p class="wp-block-paragraph">I passed a long day dealing with Jenkins runtime update (from jdk17 to jdk21), and authorisation plugin (Matrix Auth) stopping to work. Here is the tale.</p>
<p class="wp-block-paragraph">Involved system:</p>
<ul class="wp-block-list">
<li>Jenkins dockerized: https://github.com/jenkinsci/docker/blob/master/debian/trixie/hotspot/Dockerfile or maybe the slimmed version</li>
<li>https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-controllers/after-updating-matrix-project-plugin-jenkins-fails-to-restart</li>
<li>Updating from <em>jenkins/jenkins:lts-jdk17</em> –> to <em>jenkins/jenkins:lts-jdk21</em></li>
</ul>
<p class="wp-block-paragraph">Error log messages was related to hudson, and to matrix, and to authorization:</p>
<pre class="wp-block-preformatted">Caused: jenkins.util.xstream.CriticalXStreamException: <br>[LF]> ---- Debugging information ----<br>[LF]> cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException<br>[LF]> cause-message : hudson.security.GlobalMatrixAuthorizationStrategy<br>[LF]> class : hudson.model.Hudson<br>[LF]> required-type : hudson.model.Hudson<br>[LF]> converter-type : hudson.util.RobustReflectionConverter<br>[LF]> path : /hudson/authorizationStrategy<br>[LF]> line number : 14<br>[LF]> version : 2.516.3<br>[LF]> -------------------------------<br> at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:384)<br> at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:291)</pre>
<h2 class="wp-block-heading">What happened</h2>
<p class="wp-block-paragraph">The goal was to update jenkins lts to jdk21. My strategy was:</p>
<ol class="wp-block-list">
<li>update all possible plugins</li>
<li>restart</li>
<li>Update the image used</li>
<li>Update again all possible plugin</li>
</ol>
<p class="wp-block-paragraph">But after 3. I had trouble restarting the image controlled by docker swarm service.</p>
<p class="wp-block-paragraph">I followed suggestion on https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-controllers/after-updating-matrix-project-plugin-jenkins-fails-to-restart, downloaded latest version from https://plugins.jenkins.io/matrix-project/releases/</p>
<p class="wp-block-paragraph">Even tried to launch the command: <code>jenkins-plugin-cli --plugins matrix-project:858.vb_b_eb_9a_7ea_99e</code></p>
<p class="wp-block-paragraph">(And yes, I was successful! I ran it in the 30 seconds before the service hung out! …anyway this does not work)</p>
<h2 class="wp-block-heading">What I did (some time later)</h2>
<p class="wp-block-paragraph">I inspected config.xml, disabled security, and commented out all matrix of access:</p>
<pre class="wp-block-preformatted"> <useSecurity>false</useSecurity><br> <!--authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy"><br>....<br></authorizationStrategy--!></pre>
<p class="wp-block-paragraph">Copyed the <code>config.xml</code> to <code>config.xml-saved</code></p>
<p class="wp-block-paragraph">Everyone can access, but the service finally started</p>
<p class="wp-block-paragraph">Then I update all upgradable, fixed deprecated, then restarted.</p>
<p class="wp-block-paragraph">But at the end I chosen to adopt another security model, still using matrix, but using db from redmine.</p>
<h2 class="wp-block-heading">All in all: what does it do Matrix plugin</h2>
<figure class="wp-block-embed"><div class="wp-block-embed__wrapper">
https://plugins.jenkins.io/matrix-project
</div></figure>
<p class="wp-block-paragraph">Matrix project gives full control on user permission:</p>
<figure class="wp-block-image size-large"><img src="https://smartango.com/wp-content/uploads/2025/09/image-1-1024x433.png" alt="" class="wp-image-705"/></figure>
<p class="wp-block-paragraph">That is a key component for multiuser setup.</p>
<h2 class="wp-block-heading">Update 29/09/2025</h2>
<h3 class="wp-block-heading">Security, in details</h3>
<p class="wp-block-paragraph">Security assessment: Attacks vs Risks</p>
<figure class="wp-block-image size-large"><img src="https://smartango.com/wp-content/uploads/2025/09/image-2-1024x144.png" alt="" class="wp-image-708"/></figure>
<pre class="wp-block-preformatted"><img src="clipboard-202509290850-xkcbv.png" alt=""><br>Gogs plugin 1.0.15<br>Non-constant time webhook token comparison (no fix available)<br>Unsafe default behavior and information disclosure in webhook (no fix available)<br>No fixes for these issues are available. It is recommended that you review the security advisory and apply mitigations if possible, or uninstall this plugin.<br>docker-build-step 2.12<br>CSRF vulnerability and missing permission check (no fix available)<br>No fixes for these issues are available. It is recommended that you review the security advisory and apply mitigations if possible, or uninstall this plugin.</pre>
<pre class="wp-block-code"><code>https://www.jenkins.io/security/advisory/2023-10-25/#SECURITY-2896</code></pre>
<pre class="wp-block-preformatted">Non-constant time webhook token comparison in Gogs Plugin<br>SECURITY-2896 / CVE-2023-46657<br>Severity (CVSS): Low<br>Affected plugin: gogs-webhook<br>Description:<br>Gogs Plugin 1.0.15 and earlier does not use a constant-time comparison when checking whether the provided and expected webhook token are equal.</pre>
<p class="wp-block-paragraph">This could potentially allow attackers to use statistical methods to obtain a valid webhook token.</p>
<p class="wp-block-paragraph">As of publication of this advisory, there is no fix. Learn why we announce this.</p>
<pre class="wp-block-code"><code>Real attack/risk: A discover of the token can at most launch an unwanted build, but still from the same git repository and branch, so idempotent.
https://www.jenkins.io/security/advisory/2023-08-16/#SECURITY-2894</code></pre>
<pre class="wp-block-preformatted">Unsafe default behavior and information disclosure in Gogs Plugin webhook<br>SECURITY-2894 / CVE-2023-40348 (information disclosure), CVE-2023-40349 (insecure default)<br>Severity (CVSS): Medium<br>Affected plugin: gogs-webhook<br>Description:<br>Gogs Plugin provides a webhook endpoint at /gogs-webhook that can be used to trigger builds of jobs. In Gogs Plugin 1.0.15 and earlier, an option to specify a Gogs secret for this webhook is provided, but not enabled by default.</pre>
<p class="wp-block-paragraph">This allows unauthenticated attackers to trigger builds of jobs corresponding to the attacker-specified job name.</p>
<p class="wp-block-paragraph">Additionally, the output of the webhook endpoint includes whether a job corresponding to the attacker-specified job name exists, even if the attacker has no permission to access it.</p>
<p class="wp-block-paragraph">As of publication of this advisory, there is no fix. Learn why we announce this.</p>
<pre class="wp-block-code"><code>Same risk as above.
https://www.jenkins.io/security/advisory/2024-03-06/#SECURITY-3200</code></pre>
<pre class="wp-block-preformatted">CSRF vulnerability and missing permission check in docker-build-step Plugin<br>SECURITY-3200 / CVE-2024-2215 (CSRF), CVE-2024-2216 (permission check)<br>Severity (CVSS): Medium<br>Affected plugin: docker-build-step<br>Description:<br>docker-build-step Plugin 2.11 and earlier does not perform a permission check in an HTTP endpoint implementing a connection test.</pre>
<pre class="wp-block-preformatted">This allows attackers with Overall/Read permission to connect to an attacker-specified TCP or Unix socket URL. Additionally, the plugin reconfigures itself using the provided connection test parameters, affecting future build step executions.</pre>
<pre class="wp-block-preformatted">Additionally, this endpoint does not require POST requests, resulting in a cross-site request forgery (CSRF) vulnerability.</pre>
<pre class="wp-block-preformatted">As of publication of this advisory, there is no fix. Learn why we announce this.</pre>
<p class="wp-block-paragraph">Real risk: “attackers with Overall/Read permission”, must have access to the system, that is protected by Matrix Auth</p>
<h2 class="wp-block-heading">Conclusion of security assessment</h2>
<p class="wp-block-paragraph">Facing detailed attack vector is of course a good idea, but it has a cost. That cost is not landed by a real gain on security</p>
I passed a long day dealing with Jenkins runtime update (from jdk17 to jdk21), and authorisation plugin (Matrix Auth) stopping to work. Here is the tale.
Involved system:
Jenkins dockerized: https://github.com/jenkinsci/docker/blob/master/debian/trixie/hotspot/Dockerfile or maybe the slimmed version
Updating from jenkins/jenkins:lts-jdk17 –> to jenkins/jenkins:lts-jdk21
Error log messages was related to hudson, and to matrix, and to authorization:
Caused: jenkins.util.xstream.CriticalXStreamException: [LF]> ---- Debugging information ---- [LF]> cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException [LF]> cause-message : hudson.security.GlobalMatrixAuthorizationStrategy [LF]> class : hudson.model.Hudson [LF]> required-type : hudson.model.Hudson [LF]> converter-type : hudson.util.RobustReflectionConverter [LF]> path : /hudson/authorizationStrategy [LF]> line number : 14 [LF]> version : 2.516.3 [LF]> ------------------------------- at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:384) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:291)
What happened
The goal was to update jenkins lts to jdk21. My strategy was:
update all possible plugins
restart
Update the image used
Update again all possible plugin
But after 3. I had trouble restarting the image controlled by docker swarm service.
I followed suggestion on https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-controllers/after-updating-matrix-project-plugin-jenkins-fails-to-restart, downloaded latest version from https://plugins.jenkins.io/matrix-project/releases/
Even tried to launch the command: jenkins-plugin-cli --plugins matrix-project:858.vb_b_eb_9a_7ea_99e
(And yes, I was successful! I ran it in the 30 seconds before the service hung out! …anyway this does not work)
What I did (some time later)
I inspected config.xml, disabled security, and commented out all matrix of access:
Everyone can access, but the service finally started
Then I update all upgradable, fixed deprecated, then restarted.
But at the end I chosen to adopt another security model, still using matrix, but using db from redmine.
All in all: what does it do Matrix plugin
https://plugins.jenkins.io/matrix-project
Matrix project gives full control on user permission:
That is a key component for multiuser setup.
Update 29/09/2025
Security, in details
Security assessment: Attacks vs Risks
Gogs plugin 1.0.15 Non-constant time webhook token comparison (no fix available) Unsafe default behavior and information disclosure in webhook (no fix available) No fixes for these issues are available. It is recommended that you review the security advisory and apply mitigations if possible, or uninstall this plugin. docker-build-step 2.12 CSRF vulnerability and missing permission check (no fix available) No fixes for these issues are available. It is recommended that you review the security advisory and apply mitigations if possible, or uninstall this plugin.
Non-constant time webhook token comparison in Gogs Plugin SECURITY-2896 / CVE-2023-46657 Severity (CVSS): Low Affected plugin: gogs-webhook Description: Gogs Plugin 1.0.15 and earlier does not use a constant-time comparison when checking whether the provided and expected webhook token are equal.
This could potentially allow attackers to use statistical methods to obtain a valid webhook token.
As of publication of this advisory, there is no fix. Learn why we announce this.
Real attack/risk: A discover of the token can at most launch an unwanted build, but still from the same git repository and branch, so idempotent.
https://www.jenkins.io/security/advisory/2023-08-16/#SECURITY-2894
Unsafe default behavior and information disclosure in Gogs Plugin webhook SECURITY-2894 / CVE-2023-40348 (information disclosure), CVE-2023-40349 (insecure default) Severity (CVSS): Medium Affected plugin: gogs-webhook Description: Gogs Plugin provides a webhook endpoint at /gogs-webhook that can be used to trigger builds of jobs. In Gogs Plugin 1.0.15 and earlier, an option to specify a Gogs secret for this webhook is provided, but not enabled by default.
This allows unauthenticated attackers to trigger builds of jobs corresponding to the attacker-specified job name.
Additionally, the output of the webhook endpoint includes whether a job corresponding to the attacker-specified job name exists, even if the attacker has no permission to access it.
As of publication of this advisory, there is no fix. Learn why we announce this.
Same risk as above.
https://www.jenkins.io/security/advisory/2024-03-06/#SECURITY-3200
CSRF vulnerability and missing permission check in docker-build-step Plugin SECURITY-3200 / CVE-2024-2215 (CSRF), CVE-2024-2216 (permission check) Severity (CVSS): Medium Affected plugin: docker-build-step Description: docker-build-step Plugin 2.11 and earlier does not perform a permission check in an HTTP endpoint implementing a connection test.
This allows attackers with Overall/Read permission to connect to an attacker-specified TCP or Unix socket URL. Additionally, the plugin reconfigures itself using the provided connection test parameters, affecting future build step executions.
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.
Real risk: “attackers with Overall/Read permission”, must have access to the system, that is protected by Matrix Auth
Conclusion of security assessment
Facing detailed attack vector is of course a good idea, but it has a cost. That cost is not landed by a real gain on security
<p class="wp-block-paragraph">youhavebeenpawned! ( https://haveibeenpwned.com/ )</p> <p class="wp-block-paragraph">Google fortunatamente non sta a guardare, ma non può...
<p class="wp-block-paragraph">Some month ago I found this interesting project on github: <a href="https://github.com/kosty-cloud/kosty" target="_blank" rel="noopener"...