CVE-2025-48976: Introduce partHeaderTotalSizeMax for all parts of a single request#425
CVE-2025-48976: Introduce partHeaderTotalSizeMax for all parts of a single request#425Chenjp wants to merge 7 commits intoapache:masterfrom
Conversation
…SizeMax Flexible limitation policy. Particularly, "partHeaderTotalSizeMax" provides a direct memory usage limits for all parts headers. See BZ69710#c31
|
There are a lot of unrelated changes in this PR. They should be removed. With the new limit in place the per part header size limit could be relaxed/removed. In 2.0 at least anyway. |
per Mark's comment, partHeaderTotalCountMax is sufficient enough.
@markt-asf Unrelated changes removed. Thanks. |
garydgregory
left a comment
There was a problem hiding this comment.
Hi @Chenjp
Thank you for your update. Please see my comments and add Javadoc since tags for new public and protected elements.
commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/MultipartInput.java
Outdated
Show resolved
Hide resolved
...leupload2-core/src/test/java/org/apache/commons/fileupload2/core/AbstractFileUploadTest.java
Outdated
Show resolved
Hide resolved
|
I'm confused. GHSA-vv7r-c36w-3prj says that the CVE is fixed in 2.0.0-M4, while this PR is still open. The OWASP scanner still reports 2.0.0-M4 as affected. Who's right? |
|
This is just an alternative approach. |
move total header size back to fileupload
|
@garydgregory is it necessary to merge into master branch? |
|
@markt-asf Since the current code handles CVE-2025-48976, it seems safe to close this PR. Check? |
|
@garydgregory I'm not seeing this as essential. There is a limit on the number of files/parts and a limit on the header size per file/part. An additional limit on the total header size is just a different way of expressing broadly the same limit. There are subtle functional differences but I haven't seen any user requests for this so why add new features no-one is asking for? |
|
Closing in agreement with @markt-asf above. |
Flexible limitation policy. Particularly, "partHeaderTotalSizeMax" provides a direct memory usage limits for all parts headers in request level.
partHeaderTotalSizeMax
and partHeaderTotalCoutMax: apply to all header information for all parts in a single upload file request.See BZ69710#c31