{"id":"CVE-2023-36479","aliases":["CVE-2023-36479","GHSA-3gh6-v5v9-6v9j"],"related":[],"kind":"vulnerability","state":"published","title":"Jetty vulnerable to errant command quoting in CGI Servlet","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\n```java\nif (execCmd.length() > 0 && execCmd.charAt(0) != '\"' && execCmd.contains(\" \"))\nexecCmd = \"\\\"\" + execCmd + \"\\\"\";\n```\n\n### Exploit Scenario\nThe 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\nbinary 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.\n\nIf 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.\n\n### Impact\nUsers of the `org.eclipse.jetty.servlets.CGI` Servlet with a very specific command structure may have the wrong command executed.\n\n### Patches\nNo patch.\nIn Jetty 9.x, 10.x, and 11.x the `org.eclipse.jetty.servlets.CGI` has been deprecated.\nIn Jetty 12 (all environments) the `org.eclipse.jetty.servlets.CGI` has been entirely removed.\n\n### Workarounds\nThe `org.eclipse.jetty.servlets.CGI` Servlet should not be used. Fast CGI support is available instead.\n\n### References\n* https://github.com/eclipse/jetty.project/pull/9516\n* https://github.com/eclipse/jetty.project/pull/9889\n* https://github.com/eclipse/jetty.project/pull/9888","format":"markdown","source":"ghsa"},{"lang":"es","text":"Eclipse Jetty Canonical Repository es el repositorio canónico para el proyecto Jetty. Los usuarios de CgiServlet con una estructura de comando muy específica pueden ejecutar el comando incorrecto. Si un usuario envía una solicitud a un servlet org.eclipse.jetty.servlets.CGI para un binario con un espacio en su nombre, el servlet escapará del comando envolviéndolo entre comillas. Este comando empaquetado, más un prefijo de comando opcional, se ejecutará mediante una llamada a Runtime.exec. Si el nombre binario original proporcionado por el usuario contiene una comilla seguida de un espacio, la línea de comando resultante contendrá varios tokens en lugar de uno. Este problema se solucionó en las versiones 9.4.52, 10.0.16, 11.0.16 y 12.0.0-beta2.","source":"nvd"}],"published":"2023-09-14T16:16:00.000Z","modified":"2026-09-10T03:50:03.467Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N","score":3.5,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N","score":3.5,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N","score":3.5,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N","score":3.1,"rating":"LOW"}],"cwes":["CWE-149"],"affected":[{"ranges":[{"version":">= 9.0.0, <= 9.4.51","status":"affected"},{"version":">= 10.0.0, <= 10.0.15","status":"affected"},{"version":">= 11.0.0, <= 11.0.15","status":"affected"},{"version":"<= 12.0.0-beta1","status":"affected"}],"vendor":"eclipse","product":"jetty.project","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"9.0.0","status":"affected","fixed":"9.4.52"}],"ecosystem":"Maven","package":"org.eclipse.jetty:jetty-servlets","purl":"pkg:maven/org.eclipse.jetty/jetty-servlets","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"10.0.0","status":"affected","fixed":"10.0.16"}],"ecosystem":"Maven","package":"org.eclipse.jetty:jetty-servlets","purl":"pkg:maven/org.eclipse.jetty/jetty-servlets","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"11.0.0","status":"affected","fixed":"11.0.16"}],"ecosystem":"Maven","package":"org.eclipse.jetty:jetty-servlets","purl":"pkg:maven/org.eclipse.jetty/jetty-servlets","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"12.0.0-beta2"}],"ecosystem":"Maven","package":"org.eclipse.jetty.ee10:jetty-ee10-servlets","purl":"pkg:maven/org.eclipse.jetty.ee10/jetty-ee10-servlets","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"12.0.0-beta2"}],"ecosystem":"Maven","package":"org.eclipse.jetty.ee9:jetty-ee9-servlets","purl":"pkg:maven/org.eclipse.jetty.ee9/jetty-ee9-servlets","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"12.0.0-beta2"}],"ecosystem":"Maven","package":"org.eclipse.jetty.ee8:jetty-ee8-servlets","purl":"pkg:maven/org.eclipse.jetty.ee8/jetty-ee8-servlets","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"9.0.0","fixed":"9.4.52"},{"status":"affected","introduced":"10.0.0","fixed":"10.0.16"},{"status":"affected","introduced":"11.0.0","fixed":"11.0.16"},{"status":"affected","version":"12.0.0"},{"status":"affected","version":"12.0.0"},{"status":"affected","version":"12.0.0"},{"status":"affected","version":"12.0.0"},{"status":"affected","version":"12.0.0"}],"vendor":"eclipse","product":"jetty","cpe":"cpe:2.3:a:eclipse:jetty:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"},{"status":"affected","version":"11.0"},{"status":"affected","version":"12.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/eclipse/jetty.project/security/advisories/GHSA-3gh6-v5v9-6v9j","tags":["exploit","patch","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/eclipse/jetty.project/pull/9516","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/eclipse/jetty.project/pull/9888","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/eclipse/jetty.project/pull/9889","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.debian.org/security/2023/dsa-5507","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00039.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-36479","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/eclipse/jetty.project","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-25T15:04:27.724Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-36479","url":"https://www.cve.org/CVERecord?id=CVE-2023-36479","licence":"CVE Terms of Use","modified":"2025-06-18T14:41:11.113Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3gh6-v5v9-6v9j","url":"https://github.com/advisories/GHSA-3gh6-v5v9-6v9j","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:03.467Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-36479","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-36479","licence":"Public domain","modified":"2026-06-17T06:06:21.390Z"}],"updatedAt":"2026-11-25T22:58:27.938Z","epss":{"score":0.01162,"percentile":0.68104,"date":"2026-12-01T12:00:22.000Z"}}