Arbitrary Code Execution Affecting org.eclipse.jetty:jetty-servlets package, versions [9.0.0, 9.4.52) [10.0.0, 10.0.16) [11.0.0, 11.0.16)


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.1% (42nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JAVA-ORGECLIPSEJETTY-5903003
  • published 15 Sep 2023
  • disclosed 14 Sep 2023
  • credit Kelly Kaoudis, Joakim Erdfelt

How to fix?

Upgrade org.eclipse.jetty:jetty-servlets to version 9.4.52, 10.0.16, 11.0.16 or higher.

Overview

org.eclipse.jetty:jetty-servlets is an Utility Servlets from Jetty

Affected versions of this package are vulnerable to Arbitrary Code Execution. If a user sends a request to a org.eclipse.jetty.servlets.CGI Servlet for a binary with a space in its name, the servlet will escape the command by wrapping it in quotation marks.

Impact:

This behavior may bypass alias checks, and it may cause other unintended behaviors if a command prefix is configured.

Note:

In Jetty 9.x, 10.x, and 11.x the org.eclipse.jetty.servlets.CGI has been deprecated.

In Jetty 12 (all environments) the org.eclipse.jetty.servlets.CGI has been entirely removed.

PoC

if (execCmd.length() > 0 && execCmd.charAt(0) != '"' && execCmd.contains(" "))
execCmd = "\"" + execCmd + "\"";

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
3.5 low
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    None
  • Scope (S)
    Changed
  • Confidentiality (C)
    None
  • Integrity (I)
    Low
  • Availability (A)
    None
Expand this section

NVD

4.3 medium
Expand this section

SUSE

3.5 low
Expand this section

Red Hat

3.5 low