Jetty vulnerable to errant command quoting in CGI Servlet
eclipse jetty.project
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.eclipse.jetty:jetty-servlets Maven |
|
|
| org.eclipse.jetty.ee10:jetty-ee10-servlets Maven |
eclipse jetty.project
| Product | Affected | Fixed in |
|---|---|---|
| org.eclipse.jetty:jetty-servlets Maven |
|
|
| org.eclipse.jetty.ee10:jetty-ee10-servlets Maven |
|
|
| org.eclipse.jetty.ee9:jetty-ee9-servlets Maven |
|
|
| org.eclipse.jetty.ee8:jetty-ee8-servlets Maven |
|
|
Eclipse Jetty Canonical Repository is the canonical repository for the Jetty project. Users of the CgiServlet with a very specific command structure may have the wrong command executed. 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. This wrapped command, plus an optional command prefix, will then be executed through a call to Runtime.exec. If the original binary name provided by the user contains a quotation mark followed by a space, the resulting command line will contain multiple tokens instead of one. This issue was patched in version 9.4.52, 10.0.16, 11.0.16 and 12.0.0-beta2.
From the CVE record · GitHub_M
Jetty's CgiServlet can execute the wrong command when it handles a request for a binary whose name contains a quotation mark followed by a space. The issue occurs when the servlet wraps the name in quotes and passes the resulting command, with an optional prefix, to Runtime.exec. The input does not specify whether authentication is required.
Check deployments using Maven org.eclipse.jetty:jetty-servlets versions 9.0.0–9.4.51, 10.0.0–10.0.15, or 11.0.0–11.0.15, or org.eclipse.jetty.ee10:jetty-ee10-servlets, org.eclipse.jetty.ee9:jetty-ee9-servlets, or org.eclipse.jetty.ee8:jetty-ee8-servlets versions before 12.0.0-beta2.