-
Bug
-
Resolution: Done-Errata
-
Major
-
7.4.14.GA
The POST request data larger than 16KiB in multipart/form-data request becomes unavailable through Servlet getParameter API after JBoss EAP 7.4.12, which includes UNDERTOW-2271 fix for CVE-2023-3223. (The POST data is still available through getPart API, but it's not through getParameter API.)
—
Note that the servlet spec (pdf) states the following:
3.2. File Upload
...(snip)...
If the servlet container provides multipart/form-data processing, the data is made available through the following methods in HttpServletRequest:
- public Collection<Part> getParts()
- public Part getPart(String name)
Each part provides access to the headers, content type related with it and the content via the Part.getInputStream method.
For parts with form-data as the Content-Disposition, but without a filename, the string value of the part will also be available through the getParameter and getParameterValues methods on HttpServletRequest, using the name of the part.
and the same statement exists in the latest Servlet 6.0 spec.
So, using getParameter API to obtain the posted form data (not file upload but just posted text data) in the multipart request is a valid usage and use case.
—
After EAP 7.4.12 with UNDERTOW-2271, it changed the behavior of handling multipart form-data larger than 16KiB to persist it to the disk. It causes the POST form-data is treated as same as the Content-Disposition having a filename inside Undertow, so it's not available anymore through HttpServletRequest getParmeter(), getParmeterValues(), getParmeterNames(), and getParmeterMap() because it's checked with getFileItem() and returns null if the FormData is created with the persisted file.
This issue can be mitigated by setting the "io.undertow.multipart.minsize" system property to a large enough value (e.g. -Dio.undertow.multipart.minsize=10485760).
- incorporates
-
UNDERTOW-2337 Multipart form-data larger than 16KiB is not available through Servlet getParameter API
- Closed
- is caused by
-
UNDERTOW-2271 CVE-2023-3223 Large uploaded file does not persist to disk if the filename is omitted
- Closed
- is cloned by
-
JBEAP-28091 [GSS](7.3.z) UNDERTOW-2337 - Multipart form-data larger than 16KiB is not available through Servlet getParameter API after EAP 7.4.12 (CVE-2023-3223 / UNDERTOW-2271 fix)
- New
-
JBEAP-26413 [GSS](8.0.z) UNDERTOW-2337 - Multipart form-data larger than 16KiB is not available through Servlet getParameter API after EAP 7.4.12 (CVE-2023-3223 / UNDERTOW-2271 fix)
- Closed
- is incorporated by
-
JBEAP-26168 (7.4.z) Upgrade Undertow from 2.2.28.SP1 to 2.2.30.SP1
- Closed
- is related to
-
WFLY-18821 Wildfly 30: form with enctype="multipart/form-data" does not support large input data (16425 bytes)
- Closed
- links to
-
RHSA-2023:124971 Red Hat JBoss Enterprise Application Platform 7.4.16 Security update
-
RHSA-2023:124972 Red Hat JBoss Enterprise Application Platform 7.4.16 Security update
-
RHSA-2023:124973 Red Hat JBoss Enterprise Application Platform 7.4.16 Security update
-
RHSA-2023:124974 Red Hat JBoss Enterprise Application Platform 7.4.16 Security update