CVE-2022-24197: Itext7 core Out-of-bounds Write Vulnerability
MODERATECVE-2022-24197 is a MODERATE (CVSS 6.5) out-of-bounds write vulnerability (CWE-787: Out-of-bounds Write) affecting Itext7 core libraries in the Maven ecosystem. The issue involves out-of-bounds write in itext. Remediation is available by upgrading affected packages to version 7.1.18.
CVE-2022-24197 at a Glance
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).
How to Fix CVE-2022-24197
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.
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext7-core</artifactId>
<version>7.1.18</version>
</dependency>
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-24197, 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.1.18), 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-787: Out-of-bounds Write, where the product writes 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
CVE-2022-24197 Affected Itext7 core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.itextpdf:itext7-core
|
Maven |
< 7.1.18
|
7.1.18
|
References
Frequently Asked Questions
What is CVE-2022-24197?
Which Itext7 core versions are affected?
What version fixes CVE-2022-24197?
Is itext7-core affected?
What is the CVSS score of CVE-2022-24197?
What CWE is associated with CVE-2022-24197?
How can I check Maven dependencies for CVE-2022-24197?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c32g-2mgr-cfq7",
"modified" : "2022-02-07T20:59:22Z",
"published" : "2022-02-02T00:01:45Z",
"aliases" : [ "CVE-2022-24197" ],
"summary" : "Out-of-bounds Write in iText",
"details" : "iText v7.1.17 was discovered to contain a stack-based buffer overflow via the component ByteBuffer.append, which allows attackers to cause a Denial of Service (DoS) via a crafted PDF file.",
"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.1.18"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 7.1.17"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24197"
}, {
"type" : "WEB",
"url" : "https://github.com/itext/itext7/pull/78"
}, {
"type" : "WEB",
"url" : "https://github.com/itext/itext7/pull/78#issuecomment-1089282165"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/itext/itext7"
}, {
"type" : "WEB",
"url" : "https://github.com/itext/itext7/releases/tag/7.1.18"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-787" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-02-07T20:59:22Z",
"nvd_published_at" : "2022-02-01T20:15:00Z"
}
}