Vulnerabilities in pkg:maven/com.itextpdf/itext7-core

PACKAGE
Advisory Identifier: GHSA-8c9h-4q7g-fp7h
Advisory Summary

CVE-2022-24198 is a MODERATE (CVSS 6.5) out-of-bounds read vulnerability (CWE-125: Out-of-bounds Read) affecting Itext7 core libraries in the Maven ecosystem. The issue involves out-of-bounds read in itext. Remediation is available by upgrading affected packages to version 7.2.0.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.itextpdf/itext7-core

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.itextpdf/itext7-core. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8c9h-4q7g-fp7h CVE-2022-24198 MODERATE Out-of-bounds Read in iText
GHSA-c32g-2mgr-cfq7 CVE-2022-24197 MODERATE Out-of-bounds Write in iText
GHSA-hhh6-cm2m-3fhc CVE-2022-24196 MODERATE Allocation of Resources Without Limits or Throttling in iText
GHSA-gv87-q66h-4277 CVE-2021-43113 CRITICAL Command injection in itext7-core

CVE-2022-24198 at a Glance

CVE Identifier CVE-2022-24198
GHSA Identifier GHSA-8c9h-4q7g-fp7h
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Itext7 core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2022-24198

To remediate this vulnerability, upgrade all affected Itext7 core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.itextpdf:itext7-core fixed: 7.2.0
<dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>itext7-core</artifactId>
    <version>7.2.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.itextpdf

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2022-24198, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.itextpdf

Analyze the terminal output to locate any version of Itext7 core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.2.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.itextpdf command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Itext7 core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

iText v7.1.17 was discovered to contain an out-of-bounds exception via the component ARCFOUREncryption.encryptARCFOUR, which allows attackers to cause a Denial of Service (DoS) via a crafted PDF file. NOTE: Vendor does not view this as a vulnerability and has not found it to be exploitable.

CVE-2022-24198 Affected Itext7 core Versions

1 component(s)
Fixed Versions:
7.2.0
Product / Package Ecosystem Affected Versions Fixed Version
com.itextpdf:itext7-core
Maven
< 7.2.0
7.2.0

References

Frequently Asked Questions

What is CVE-2022-24198?
CVE-2022-24198 is a security vulnerability in Itext7 core involving Out-of-bounds Read in iText under CWE-125: Out-of-bounds Read.
Which Itext7 core versions are affected?
Affected versions include releases prior to 7.2.0 across affected packages: com.itextpdf:itext7-core.
What version fixes CVE-2022-24198?
Upgrading to 7.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is itext7-core affected?
Yes, com.itextpdf:itext7-core is affected in releases prior to 7.2.0. Upgrade your dependency to 7.2.0 or later.
What is the CVSS score of CVE-2022-24198?
CVE-2022-24198 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2022-24198?
CVE-2022-24198 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check Maven dependencies for CVE-2022-24198?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.itextpdf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8c9h-4q7g-fp7h",
  "modified" : "2023-03-07T23:46:45Z",
  "published" : "2022-02-02T00:01:45Z",
  "aliases" : [ "CVE-2022-24198" ],
  "summary" : "Out-of-bounds Read in iText",
  "details" : "iText v7.1.17 was discovered to contain an out-of-bounds exception via the component ARCFOUREncryption.encryptARCFOUR, which allows attackers to cause a Denial of Service (DoS) via a crafted PDF file. NOTE: Vendor does not view this as a vulnerability and has not found it to be exploitable.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.itextpdf:itext7-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.2.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.1.17"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24198"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/itext/itext7/pull/78"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/itext/itext7/pull/78#issuecomment-1089287808"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/itext/itext7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-125" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-02-07T20:59:10Z",
    "nvd_published_at" : "2022-02-01T20:15:00Z"
  }
}