{
  "containers": {
    "cna": {
      "affected": [
        {
          "collectionURL": "https://repo.maven.apache.org/maven2",
          "defaultStatus": "unaffected",
          "packageName": "org.apache.mina:mina-filter-compression",
          "product": "Apache MINA",
          "vendor": "Apache Software Foundation",
          "versions": [
            {
              "lessThan": "2.2.8",
              "status": "affected",
              "version": "2.2.0",
              "versionType": "maven"
            },
            {
              "lessThan": "2.1.13",
              "status": "affected",
              "version": "2.1.0",
              "versionType": "maven"
            },
            {
              "lessThan": "2.0.29",
              "status": "affected",
              "version": "2.0.0",
              "versionType": "maven"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "Venkatraman Kumar, SecurIn"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "<div>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.</div><div>Some compressed data may have a compression ration greater than 1 thousand, leading to an exhaustion of the application memory, as we don't control the deflated size.</div><div><br></div><div>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)</div><div><br></div><div>For application using this feature, it is highly recommended to create the&nbsp;CompressionFilter and to pass the maximum limit as a forth constructor parameter, maxDecompressedSize:</div><div><br></div><blockquote>public <span>CompressionFilter</span>(final boolean compressInbound, final boolean compressOutbound, final int compressionLevel, final int maxDecompressedSize)</blockquote><div>Optionally one can also provide a&nbsp;<span><span><span>maxDecompressRatio</span></span></span>&nbsp;fifth parameter, and a <span><span><span>decompressRatioMinSize</span></span></span>&nbsp;sixth parameter to allow small inflated files with a high compression ratio to still be accepted.</div><div><br></div><div>Here are the additional constructor:</div><div><br></div><div><div><div><blockquote><p>public CompressionFilter(final boolean compressInbound, final boolean compressOutbound,</p><p>            final int compressionLevel, final int maxDecompressedSize,</p><p>            final long maxDecompressRatio, final long <span>decompressRatioMinSize</span>)</p></blockquote></div></div><br></div><div>Also note that a fluent API has been added to spare the users the pain to call a constructor with that many parameters:</div><div><br></div><div></div><blockquote><div>\u2003CompressionFilter compressionFilter = new CompressionFilter()</div><div>\u2003\u2003\u2003                                             .setCompressionLevel(Zlib.<span><span><span>COMPRESSION_MAX</span></span></span>)</div><div>&nbsp;                                               .<span><span>setMaxDecompressedSize</span></span>(1_000_000)</div><div>&nbsp;                                               .<span><span>setMaxDecompressRatio</span></span>(100).</div><div>&nbsp;                                               .<span><span>setDecompressRatioMinSize</span></span>(100_000);&nbsp;</div><div></div></blockquote><div></div><div><br></div><div>\nApplications using Apache MINA are advised to upgrade and configure their CompressionFilter instance.</div>"
            }
          ],
          "value": "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.\n\nSome compressed data may have a compression ration greater than 1 thousand, leading to an exhaustion of the application memory, as we don't control the deflated size.\n\n\n\n\nThe 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)\n\n\n\n\nFor application using this feature, it is highly recommended to create the\u00a0CompressionFilter and to pass the maximum limit as a forth constructor parameter, maxDecompressedSize:\n\n\n\n\npublic 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.\n\n\n\n\nHere are the additional constructor:\n\n\n\n\n\n\npublic CompressionFilter(final boolean compressInbound, final boolean compressOutbound,\n\n\n\n            final int compressionLevel, final int maxDecompressedSize,\n\n\n\n            final long maxDecompressRatio, final long decompressRatioMinSize)\n\n\n\n\n\n\n\n\nAlso note that a fluent API has been added to spare the users the pain to call a constructor with that many parameters:\n\n\n\n\n\n\n\u2003CompressionFilter compressionFilter = new CompressionFilter()\n\n\u2003\u2003\u2003                                             .setCompressionLevel(Zlib.COMPRESSION_MAX)\n\n\u00a0                                               .setMaxDecompressedSize(1_000_000)\n\n\u00a0                                               .setMaxDecompressRatio(100).\n\n\u00a0                                               .setDecompressRatioMinSize(100_000);\u00a0\n\n\n\n\n\n\n\n\n\nApplications using Apache MINA are advised to upgrade and configure their CompressionFilter instance."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 7.5,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "NONE",
            "integrityImpact": "NONE",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
            "version": "3.1"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-409",
              "description": "CWE-409: Improper Handling of Highly Compressed Data \u2014 Data Amplification",
              "lang": "en",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "cweId": "CWE-789",
              "description": "CWE-789: Memory Allocation with Excessive Size Value",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "orgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09"
      },
      "references": [
        {
          "tags": [
            "mailing-list",
            "vendor-advisory"
          ],
          "url": "https://lists.apache.org/thread/y7xj1bl8qo47p9bktb11hg5v6k1d4dyj"
        }
      ],
      "source": {
        "discovery": "UNKNOWN"
      },
      "title": "Unbounded Decompression Amplification DoS in Zlib.inflate",
      "x_generator": {
        "engine": "Vulnogram 0.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09",
    "cveId": "CVE-2026-47321",
    "serial": 1,
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}