CVE-2019-10241: Cross-site Scripting in Eclipse Jetty
Summary
CVE-2019-10241: Cross-site Scripting in Eclipse Jetty. Affects org.eclipse.jetty:jetty-server across 3 version ranges.
< 9.2.27.v20190403
>= 9.3.0, < 9.3.26.v20190403
>= 9.4.0, < 9.4.16.v20190411
Fixed in 9.2.27.v20190403, 9.3.26.v20190403 or 9.4.16.v20190411, depending on the release line you run. How to fix ↓
Also tracked for
- jetty9 · Debian:11
The same CVE-2019-10241 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Eclipse Jetty is a Java-based web server and servlet container widely used in various applications. It provides a lightweight and scalable solution for serving web content. However, versions 9.2.26 and older, 9.3.25 and older, and 9.4.15 and older of Jetty are vulnerable to a cross-site scripting (XSS) attack. This vulnerability arises when a remote client utilizes a specially crafted URL against the DefaultServlet or ResourceHandler configured to display directory contents.
Vulnerability Detail
The XSS vulnerability in Eclipse Jetty allows an attacker to inject malicious scripts into web pages viewed by unsuspecting users. By exploiting this vulnerability, an attacker can execute arbitrary code within the context of the user's browser, potentially leading to session hijacking, data theft, or other malicious activities. The vulnerability is rated as moderate severity with a CVSS score of 6.1.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 9.2.27.v201904039.2.27.v20190403 -
>= 9.3.0, < 9.3.26.v201904039.3.26.v20190403 -
>= 9.4.0, < 9.4.16.v201904119.4.16.v20190411
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, it is advised to disable directory listing in the affected Jetty server configurations. This can be achieved by modifying the server configuration files to prevent the DefaultServlet or ResourceHandler from displaying directory contents. Here is an example of how to disable directory listing in the Jetty server configuration:
<Configure class="org.eclipse.jetty.servlet.ServletContextHandler">
<Set name="initParams">
<New class="org.eclipse.jetty.servlet.DefaultServlet">
<Set name="dirAllowed">false</Set>
</New>
</Set>
```
</Configure>
```
Conclusion
In conclusion, Eclipse Jetty versions 9.2.26 and older, 9.3.25 and older, and 9.4.15 and older are vulnerable to a cross-site scripting (XSS) attack. It is crucial to upgrade to the fixed versions mentioned above or apply the provided workaround to mitigate the vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.eclipse.jetty:jetty-server →
FAQ
The vulnerability allows an attacker to inject malicious scripts into web pages, potentially leading to session hijacking, data theft, or other malicious activities.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just the pom.xml file.
Yes, the vulnerability can be fixed by upgrading to the recommended fixed versions of Eclipse Jetty.
Yes, as a temporary workaround, you can disable directory listing in the affected Jetty server configurations. Please refer to the provided example for details.
The vulnerability is rated as moderate severity with a CVSS score of 6.1.
Related vulnerabilities
Recent vulnerabilities recorded for org.eclipse.jetty:jetty-server.