Miggo Logo

CVE-2023-36479: Jetty vulnerable to errant command quoting in CGI Servlet

3.5

CVSS Score
3.1

Basic Information

EPSS Score
0.74103%
Published
9/14/2023
Updated
11/6/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.eclipse.jetty:jetty-servletsmaven>= 9.0.0, <= 9.4.519.4.52
org.eclipse.jetty:jetty-servletsmaven>= 10.0.0, <= 10.0.1510.0.16
org.eclipse.jetty:jetty-servletsmaven>= 11.0.0, <= 11.0.1511.0.16
org.eclipse.jetty.ee10:jetty-ee10-servletsmaven<= 12.0.0-beta112.0.0-beta2
org.eclipse.jetty.ee9:jetty-ee9-servletsmaven<= 12.0.0-beta112.0.0-beta2
org.eclipse.jetty.ee8:jetty-ee8-servletsmaven<= 12.0.0-beta112.0.0-beta2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the command escaping logic shown in the code snippet that wraps commands in quotes when spaces are present. This implementation fails to account for existing quotation marks in user-supplied filenames, allowing command injection through crafted filenames containing " followed by space. The code pattern matches the described vulnerability scenario where Runtime.exec() parses the malformed quoted command string into unintended arguments. The direct connection between the shown code pattern and the described exploit scenario indicates this is the primary vulnerable function in the CGI Servlet implementation.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

I* * us*r s*n*s * r*qu*st to * `or*.**lips*.j*tty.s*rvl*ts.**I` S*rvl*t *or * *in*ry wit* * sp*** in its n*m*, t** s*rvl*t will *s**p* t** *omm*n* *y wr*ppin* it in quot*tion m*rks. T*is wr*pp** *omm*n*, plus *n option*l *omm*n* pr**ix, will t**n **

Reasoning

T** vuln*r**ility st*ms *rom t** *omm*n* *s**pin* lo*i* s*own in t** *o** snipp*t t**t wr*ps *omm*n*s in quot*s w**n sp***s *r* pr*s*nt. T*is impl*m*nt*tion **ils to ***ount *or *xistin* quot*tion m*rks in us*r-suppli** `*il*n*m*s`, *llowin* *omm*n*