cve-2023-42503
Vulnerability from cvelistv5
Published
2023-09-14 07:45
Modified
2024-08-02 19:23
Severity ?
Summary
Apache Commons Compress: Denial of service via CPU consumption for malformed TAR file
Impacted products
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T19:23:39.663Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "vendor-advisory",
              "x_transferred"
            ],
            "url": "https://lists.apache.org/thread/5xwcyr600mn074vgxq92tjssrchmc93c"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://security.netapp.com/advisory/ntap-20231020-0003/"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "collectionURL": "https://repo.maven.apache.org/maven2/",
          "defaultStatus": "unaffected",
          "packageName": "org.apache.commons:commons-compress",
          "product": "Apache Commons Compress",
          "vendor": "Apache Software Foundation",
          "versions": [
            {
              "lessThan": "1.24.0",
              "status": "affected",
              "version": "1.22",
              "versionType": "maven"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "reporter",
          "value": "Yakov Shafranovich, Amazon Web Services"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "Improper Input Validation, Uncontrolled Resource Consumption vulnerability in Apache Commons Compress in TAR parsing.\u003cp\u003eThis issue affects Apache Commons Compress:\u0026nbsp;from 1.22 before 1.24.0.\u003c/p\u003e\u003cp\u003eUsers are recommended to upgrade to version 1.24.0, which fixes the issue.\u003c/p\u003e\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003eA third party can create a malformed TAR file by manipulating file modification times headers, which when parsed with Apache Commons Compress, will cause a denial of service issue via CPU consumption.\u003c/span\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003eIn version 1.22 of Apache Commons Compress, support was added for file modification times with higher precision (issue # COMPRESS-612 [1]). The format for the PAX extended headers carrying this data consists of two numbers separated by a period [2], indicating seconds and subsecond precision (for example \u201c1647221103.5998539\u201d). The impacted fields are \u201catime\u201d, \u201cctime\u201d, \u201cmtime\u201d and \u201cLIBARCHIVE.creationtime\u201d. No input validation is performed prior to the parsing of header values.\u003c/span\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003eParsing of these numbers uses the BigDecimal [3] class from the JDK which has a publicly known algorithmic complexity issue when doing operations on large numbers, causing denial of service (see issue # JDK-6560193 [4]). A third party can manipulate file time headers in a TAR file by placing a number with a very long fraction (300,000 digits) or a number with exponent notation (such as \u201c9e9999999\u201d) within a file modification time header, and the parsing of files with these headers will take hours instead of seconds, leading to a denial of service via exhaustion of CPU resources. This issue is similar to CVE-2012-2098 [5].\u003c/span\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003e[1]: \u003c/span\u003e\u003ca target=\"_blank\" rel=\"nofollow\" href=\"https://issues.apache.org/jira/browse/COMPRESS-612\"\u003ehttps://issues.apache.org/jira/browse/COMPRESS-612\u003c/a\u003e\u003cbr\u003e\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003e[2]: \u003c/span\u003e\u003ca target=\"_blank\" rel=\"nofollow\" href=\"https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_05\"\u003ehttps://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_05\u003c/a\u003e\u003cbr\u003e\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003e[3]: \u003c/span\u003e\u003ca target=\"_blank\" rel=\"nofollow\" href=\"https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html\"\u003ehttps://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html\u003c/a\u003e\u003cbr\u003e\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003e[4]: \u003c/span\u003e\u003ca target=\"_blank\" rel=\"nofollow\" href=\"https://bugs.openjdk.org/browse/JDK-6560193\"\u003ehttps://bugs.openjdk.org/browse/JDK-6560193\u003c/a\u003e\u003cbr\u003e\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003e[5]: \u003c/span\u003e\u003ca target=\"_blank\" rel=\"nofollow\" href=\"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2098\"\u003ehttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2098\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003eOnly applications using CompressorStreamFactory class (with auto-detection of file types), TarArchiveInputStream and TarFile classes to parse TAR files are impacted. Since this code was introduced in v1.22, only that version and later versions are impacted.\u003c/span\u003e\u003cbr\u003e\u003cbr\u003e"
            }
          ],
          "value": "Improper Input Validation, Uncontrolled Resource Consumption vulnerability in Apache Commons Compress in TAR parsing.This issue affects Apache Commons Compress:\u00a0from 1.22 before 1.24.0.\n\nUsers are recommended to upgrade to version 1.24.0, which fixes the issue.\n\nA third party can create a malformed TAR file by manipulating file modification times headers, which when parsed with Apache Commons Compress, will cause a denial of service issue via CPU consumption.\n\nIn version 1.22 of Apache Commons Compress, support was added for file modification times with higher precision (issue # COMPRESS-612 [1]). The format for the PAX extended headers carrying this data consists of two numbers separated by a period [2], indicating seconds and subsecond precision (for example \u201c1647221103.5998539\u201d). The impacted fields are \u201catime\u201d, \u201cctime\u201d, \u201cmtime\u201d and \u201cLIBARCHIVE.creationtime\u201d. No input validation is performed prior to the parsing of header values.\n\nParsing of these numbers uses the BigDecimal [3] class from the JDK which has a publicly known algorithmic complexity issue when doing operations on large numbers, causing denial of service (see issue # JDK-6560193 [4]). A third party can manipulate file time headers in a TAR file by placing a number with a very long fraction (300,000 digits) or a number with exponent notation (such as \u201c9e9999999\u201d) within a file modification time header, and the parsing of files with these headers will take hours instead of seconds, leading to a denial of service via exhaustion of CPU resources. This issue is similar to CVE-2012-2098 [5].\n\n[1]:  https://issues.apache.org/jira/browse/COMPRESS-612 \n[2]:  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_05 \n[3]:  https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html \n[4]:  https://bugs.openjdk.org/browse/JDK-6560193 \n[5]:  https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2098 \n\nOnly applications using CompressorStreamFactory class (with auto-detection of file types), TarArchiveInputStream and TarFile classes to parse TAR files are impacted. Since this code was introduced in v1.22, only that version and later versions are impacted.\n\n"
        }
      ],
      "metrics": [
        {
          "other": {
            "content": {
              "text": "moderate"
            },
            "type": "Textual description of severity"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-20",
              "description": "CWE-20 Improper Input Validation",
              "lang": "en",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "cweId": "CWE-400",
              "description": "CWE-400 Uncontrolled Resource Consumption",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2023-09-14T07:45:14.520Z",
        "orgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09",
        "shortName": "apache"
      },
      "references": [
        {
          "tags": [
            "vendor-advisory"
          ],
          "url": "https://lists.apache.org/thread/5xwcyr600mn074vgxq92tjssrchmc93c"
        },
        {
          "url": "https://security.netapp.com/advisory/ntap-20231020-0003/"
        }
      ],
      "source": {
        "discovery": "EXTERNAL"
      },
      "title": "Apache Commons Compress: Denial of service via CPU consumption for malformed TAR file",
      "x_generator": {
        "engine": "Vulnogram 0.1.0-dev"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09",
    "assignerShortName": "apache",
    "cveId": "CVE-2023-42503",
    "datePublished": "2023-09-14T07:45:14.520Z",
    "dateReserved": "2023-09-11T11:59:40.623Z",
    "dateUpdated": "2024-08-02T19:23:39.663Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-42503\",\"sourceIdentifier\":\"security@apache.org\",\"published\":\"2023-09-14T08:15:08.057\",\"lastModified\":\"2024-02-21T21:27:10.477\",\"vulnStatus\":\"Analyzed\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"Improper Input Validation, Uncontrolled Resource Consumption vulnerability in Apache Commons Compress in TAR parsing.This issue affects Apache Commons Compress:\u00a0from 1.22 before 1.24.0.\\n\\nUsers are recommended to upgrade to version 1.24.0, which fixes the issue.\\n\\nA third party can create a malformed TAR file by manipulating file modification times headers, which when parsed with Apache Commons Compress, will cause a denial of service issue via CPU consumption.\\n\\nIn version 1.22 of Apache Commons Compress, support was added for file modification times with higher precision (issue # COMPRESS-612 [1]). The format for the PAX extended headers carrying this data consists of two numbers separated by a period [2], indicating seconds and subsecond precision (for example \u201c1647221103.5998539\u201d). The impacted fields are \u201catime\u201d, \u201cctime\u201d, \u201cmtime\u201d and \u201cLIBARCHIVE.creationtime\u201d. No input validation is performed prior to the parsing of header values.\\n\\nParsing of these numbers uses the BigDecimal [3] class from the JDK which has a publicly known algorithmic complexity issue when doing operations on large numbers, causing denial of service (see issue # JDK-6560193 [4]). A third party can manipulate file time headers in a TAR file by placing a number with a very long fraction (300,000 digits) or a number with exponent notation (such as \u201c9e9999999\u201d) within a file modification time header, and the parsing of files with these headers will take hours instead of seconds, leading to a denial of service via exhaustion of CPU resources. This issue is similar to CVE-2012-2098 [5].\\n\\n[1]:  https://issues.apache.org/jira/browse/COMPRESS-612 \\n[2]:  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_05 \\n[3]:  https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html \\n[4]:  https://bugs.openjdk.org/browse/JDK-6560193 \\n[5]:  https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2098 \\n\\nOnly applications using CompressorStreamFactory class (with auto-detection of file types), TarArchiveInputStream and TarFile classes to parse TAR files are impacted. Since this code was introduced in v1.22, only that version and later versions are impacted.\\n\\n\"},{\"lang\":\"es\",\"value\":\"\\\"Vulnerabilidad de Validaci\u00f3n de Entrada Incorrecta, Consumo de Recursos Incontrolado en Apache Commons Compress en el an\u00e1lisis TAR. Este problema afecta a Apache Commons Compress: desde 1.22 antes de 1.24.0. Se recomienda a los usuarios actualizar a la versi\u00f3n 1.24.0, que soluciona el problema. Un tercero puede crear un archivo TAR malformado manipulando los encabezados de los tiempos de modificaci\u00f3n del archivo, que cuando se analizan con Apache Commons Compress, causar\u00e1n un problema de denegaci\u00f3n de servicio debido al consumo de CPU. En la versi\u00f3n 1.22 de Apache Commons Compress, se soportan tiempos de modificaci\u00f3n de archivos con mayor precisi\u00f3n (problema # COMPRESS-612 [1]). El formato de los encabezados extendidos de PAX que contienen estos datos consta de dos n\u00fameros separados por un punto [2], que indica segundos y precisi\u00f3n de subsegundos (por ejemplo, \u201c1647221103.5998539\u201d). Los campos afectados son \\\"\\\"atime\\\"\\\", \\\"\\\"ctime\\\"\\\", \\\"\\\"mtime\\\"\\\" y \\\"\\\"LIBARCHIVE.creationtime\\\"\\\". No se realiza ninguna validaci\u00f3n de entrada antes del an\u00e1lisis de los valores del encabezado. El an\u00e1lisis de estos n\u00fameros utiliza la clase BigDecimal [3] del JDK, que tiene un problema de complejidad algor\u00edtmica conocido p\u00fablicamente al realizar operaciones con n\u00fameros grandes, lo que provoca denegaci\u00f3n de servicio (consulte el problema # JDK-6560193 [4]). Un tercero puede manipular los encabezados de tiempo de un archivo TAR colocando un n\u00famero con una fracci\u00f3n muy larga (300.000 d\u00edgitos) o un n\u00famero con notaci\u00f3n de exponente (como \\\"\\\"9e9999999\\\"\\\") dentro de un encabezado de tiempo de modificaci\u00f3n del archivo y el an\u00e1lisis de los archivos. con estos encabezados llevar\u00e1 horas en lugar de segundos, lo que provocar\u00e1 una denegaci\u00f3n de servicio por agotamiento de los recursos de la CPU. Este problema es similar a CVE-2012-2098 [5]. \\n[1]: https://issues.apache.org/jira/browse/COMPRESS-612 \\n[2]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_05 \\n[3]: https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html \\n[4]: ??https://bugs.openjdk.org/browse/JDK-6560193 \\n[5]: https: //cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2098\\nSolo se ven afectadas las aplicaciones que utilizan la clase CompressorStreamFactory (con detecci\u00f3n autom\u00e1tica de tipos de archivos), TarArchiveInputStream y TarFile para analizar archivos TAR. Dado que este c\u00f3digo se introdujo en la versi\u00f3n 1.22, solo esa versi\u00f3n y las versiones posteriores se ven afectadas.\\\"\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"REQUIRED\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"NVD-CWE-noinfo\"}]},{\"source\":\"security@apache.org\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-20\"},{\"lang\":\"en\",\"value\":\"CWE-400\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:apache:commons_compress:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"1.22\",\"versionEndExcluding\":\"1.24.0\",\"matchCriteriaId\":\"F05475BE-7994-4CCC-A70C-FCBE832D886A\"}]}]}],\"references\":[{\"url\":\"https://lists.apache.org/thread/5xwcyr600mn074vgxq92tjssrchmc93c\",\"source\":\"security@apache.org\",\"tags\":[\"Issue Tracking\",\"Mailing List\",\"URL Repurposed\"]},{\"url\":\"https://security.netapp.com/advisory/ntap-20231020-0003/\",\"source\":\"security@apache.org\",\"tags\":[\"Third Party Advisory\"]}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...

Loading...
  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.