Critical flaws in Jenkins Server at risk of leaking Sensitive Information

A popular open-source automation server software Jenkins published an advisory on Monday concerning a critical flaws in the Jetty web server that could result in memory corruption and cause confidential information to be disclosed. This flaw was tracked as CVE-2019-17638 having a CVSS rating of 9.4 and impacts Eclipse Jetty versions 9.4.27.v20200227 to 9.4.29.v20200521, a full-featured tool that provides a Java HTTP server and web container for use in software frameworks.

According to the advisory published by Jenkins for the CVE-2019-17638, Jenkins bundles Winstone-Jetty, a wrapper around Jetty, to act as HTTP and servlet server when started using a command java -jar jenkins.war. This is how Jenkins is run when using any of the packages and installers, but not when run using servlet containers such as Tomcat.

About the Vulnerability

This flaw in jenkins may allow unauthenticated attackers to obtain HTTP response headers that may include sensitive data intended for another user. The vulnerability, which impacts Jetty and Jenkins Core, appears to have been introduced in Jetty version 9.4.27, which added a mechanism to handle large HTTP response headers and prevent buffer overflows.

Critical flaws in Jenkins Server at risk of leaking Sensitive Information
Source: NIST

Greg Wilkins (Jetty's project head) said that the issue was in the case of a buffer overflow, we released the header buffer, but did not null the field. To handle this issue, Jetty throws an exception to produce an HTTP 431 error, which causes the HTTP response headers to be released to the buffer pool two times, in turn causing information disclosure and memory corruption. Thus, due to this double release, two threads can acquire the same buffer from the pool at the same time and potentially allowing one request to access a response written by the other thread, which may include authentication credentials, session identifiers and other sensitive information.

Put differently, while first thread is about to use the ByteBuffer to write first response data then second thread fills the ByteBuffer with second response data. After this first Thread then proceeds to write the buffer that now contains second response data. This results in client A, which issued request A and expects responses, to see response B which could contain sensitive data belonging to client B.

In case one, the memory corruption made it possible for clients to move between sessions, thereby having cross-account access, as authentication cookies from one user's response were sent to the another user, thereby allowing user 1 to jump in user 2's session.


After the security implications were disclosed, the bug was addressed in Jetty 9.4.30.v20200611 released last month. Jenkins, which bundles Jetty via a command-line interface called Winstone, has patched the vulnerability in its utility in Jenkins 2.243 and Jenkins LTS 2.235.5 released yesterday. It is recommended that Jenkins users update their software to the latest version to mitigate the buffer corruption flaw.

Last week, Security researchers reported a bug to Amazon in which Amazon's voice assistant Alexa could be exploited to hand over sensitive user data due to security flaws in the service's subdomains. Critical data like phone numbers, home addresses, usernames, and banking data history could theoretically be stolen due to security flaw in Amazon's Alexa.

Does this article being helpful to you? Let us know your thoughts in the comments section and share it with us on Facebook, Twitter, or our LinkedIn Group.


Previous Post Next Post