CVE-2023-36479

CVE-2023-36479 is a low-severity security vulnerability in org.eclipse.jetty:jetty-servlets (maven), affecting versions >= 9.0.0, <= 9.4.51. It is fixed in 9.4.52, 10.0.16, 11.0.16, 12.0.0-beta2.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Jetty vulnerable to errant command quoting in CGI Servlet

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. For example, if a request references a binary called file” name “here, the escaping algorithm will generate the command line string “file” name “here”, which will invoke the binary named file, not the one that the user requested.

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

Exploit Scenario

The cgi-bin directory contains a binary named exec and a subdirectory named exec” commands, which contains a file called bin1. The user sends to the CGI servlet a request for the filename exec” commands/bin1. This request will pass the file existence check on lines 194 through 205. The servlet will add quotation marks around this filename, resulting in the command line string “exec” commands/bin1”. When this string is passed to Runtime.exec, instead of executing the bin1 binary, the server will execute the exec
binary with the argument commands/file1”. In addition to being incorrect, this behavior may bypass alias checks, and it may cause other unintended behaviors if a command prefix is configured.

If the useFullPath configuration setting is off, the command need not pass the existence check. The attack would not rely on a binary and subdirectory having similar names, and the attack will succeed on a much wider variety of directory structures.

Workarounds

The org.eclipse.jetty.servlets.CGI Servlet should not be used. Fast CGI support is available instead.

References

Impact

Users of the org.eclipse.jetty.servlets.CGI Servlet with a very specific command structure may have the wrong command executed.

CVE-2023-36479 has a CVSS score of 3.5 (Low). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (9.4.52, 10.0.16, 11.0.16, 12.0.0-beta2); upgrading removes the vulnerable code path.

Affected versions

org.eclipse.jetty:jetty-servlets (>= 9.0.0, <= 9.4.51) org.eclipse.jetty:jetty-servlets (>= 10.0.0, <= 10.0.15) org.eclipse.jetty:jetty-servlets (>= 11.0.0, <= 11.0.15) org.eclipse.jetty.ee10:jetty-ee10-servlets (<= 12.0.0-beta1) org.eclipse.jetty.ee9:jetty-ee9-servlets (<= 12.0.0-beta1) org.eclipse.jetty.ee8:jetty-ee8-servlets (<= 12.0.0-beta1)

Security releases

org.eclipse.jetty:jetty-servlets → 9.4.52 (maven) org.eclipse.jetty:jetty-servlets → 10.0.16 (maven) org.eclipse.jetty:jetty-servlets → 11.0.16 (maven) org.eclipse.jetty.ee10:jetty-ee10-servlets → 12.0.0-beta2 (maven) org.eclipse.jetty.ee9:jetty-ee9-servlets → 12.0.0-beta2 (maven) org.eclipse.jetty.ee8:jetty-ee8-servlets → 12.0.0-beta2 (maven)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

No patch.
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.

Frequently Asked Questions

  1. What is CVE-2023-36479? CVE-2023-36479 is a low-severity security vulnerability in org.eclipse.jetty:jetty-servlets (maven), affecting versions >= 9.0.0, <= 9.4.51. It is fixed in 9.4.52, 10.0.16, 11.0.16, 12.0.0-beta2.
  2. How severe is CVE-2023-36479? CVE-2023-36479 has a CVSS score of 3.5 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2023-36479?
    • org.eclipse.jetty:jetty-servlets (maven) (versions >= 9.0.0, <= 9.4.51)
    • org.eclipse.jetty.ee10:jetty-ee10-servlets (maven) (versions <= 12.0.0-beta1)
    • org.eclipse.jetty.ee9:jetty-ee9-servlets (maven) (versions <= 12.0.0-beta1)
    • org.eclipse.jetty.ee8:jetty-ee8-servlets (maven) (versions <= 12.0.0-beta1)
  4. Is there a fix for CVE-2023-36479? Yes. CVE-2023-36479 is fixed in 9.4.52, 10.0.16, 11.0.16, 12.0.0-beta2. Upgrade to this version or later.
  5. Is CVE-2023-36479 exploitable, and should I be worried? Whether CVE-2023-36479 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2023-36479 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2023-36479?
    • Upgrade org.eclipse.jetty:jetty-servlets to 9.4.52 or later
    • Upgrade org.eclipse.jetty:jetty-servlets to 10.0.16 or later
    • Upgrade org.eclipse.jetty:jetty-servlets to 11.0.16 or later
    • Upgrade org.eclipse.jetty.ee10:jetty-ee10-servlets to 12.0.0-beta2 or later
    • Upgrade org.eclipse.jetty.ee9:jetty-ee9-servlets to 12.0.0-beta2 or later
    • Upgrade org.eclipse.jetty.ee8:jetty-ee8-servlets to 12.0.0-beta2 or later

Other vulnerabilities in org.eclipse.jetty:jetty-servlets

Stop the waste.
Protect your environment with Kodem.