{"id":27105,"date":"2026-09-21T16:30:39","date_gmt":"2026-09-21T08:30:39","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-47321"},"modified":"2026-09-21T16:30:39","modified_gmt":"2026-09-21T08:30:39","slug":"cve-2026-47321","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-47321","title":{"rendered":"CVE-2026-47321 [HIGH] &#8211; The CompressionFilter class uses ZLib to deflate and inflate data sent and received. When"},"content":{"rendered":"<p>The CompressionFilter class uses ZLib to deflate and inflate data sent and received. When we inflate incoming data, the filter does not control the resulting size, and create a buffer no matter what.<\/p>\n<p>Some compressed data may have a compression ration greater than 1 thousand, leading to an exhaustion of the application memory, as we don&#8217;t control the deflated size.<\/p>\n<p>The fix adds such a control by allowing the application developer to provide a fixed size limit, which when reached throws an exception. It also allows the user to provide a compression ratio that should not be exceeded, protected the application from small inflated files that inflate in gigantic files, but with a grace limit for the resulting size (1Mb) to avoid false positive (like a very small file inflating with a high ratio, but resulting with a acceptable size, like a few thousands bytes)<\/p>\n<p>For application using this feature, it is highly recommended to create the\u00a0CompressionFilter and to pass the maximum limit as a forth constructor parameter, maxDecompressedSize:<\/p>\n<p>public CompressionFilter(final boolean compressInbound, final boolean compressOutbound, final int compressionLevel, final int maxDecompressedSize)Optionally one can also provide a\u00a0maxDecompressRatio\u00a0fifth parameter, and a decompressRatioMinSize\u00a0sixth parameter to allow small inflated files with a high compression ratio to still be accepted.<\/p>\n<p>Here are the additional constructor:<\/p>\n<p>public CompressionFilter(final boolean compressInbound, final boolean compressOutbound,<\/p>\n<p>            final int compressionLevel, final int maxDecompressedSize,<\/p>\n<p>            final long maxDecompressRatio, final long decompressRatioMinSize)<\/p>\n<p>Also note that a fluent API has been added to spare the users the pain to call a constructor with that many parameters:<\/p>\n<p>\u2003CompressionFilter compressionFilter = new CompressionFilter()<\/p>\n<p>\u2003\u2003\u2003                                             .setCompressionLevel(Zlib.COMPRESSION_MAX)<\/p>\n<p>\u00a0                                               .setMaxDecompressedSize(1_000_000)<\/p>\n<p>\u00a0                                               .setMaxDecompressRatio(100).<\/p>\n<p>\u00a0                                               .setDecompressRatioMinSize(100_000);\u00a0<\/p>\n<p>Applications using Apache MINA are advised to upgrade and configure their CompressionFilter instance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The CompressionFilter class uses ZLib to deflate and inflate data sent and received. When we inflate incoming data, the filter does not control the resulting size, and create a buffer no matter what.<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-27105","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/27105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}