Vulnerabilities in pkg:maven/org.apache.xmlgraphics/batik

PACKAGE
Advisory Identifier: GHSA-h4qg-p7r2-cpg3
Advisory Summary

CVE-2022-40146 is a HIGH (CVSS 7.5) apache batik vulnerable to server-side vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Batik libraries in the Maven ecosystem. The issue involves apache batik vulnerable to server-side request forgery. Remediation is available by upgrading affected packages to version 1.15.

9 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.xmlgraphics/batik

9 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.xmlgraphics/batik. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-h4qg-p7r2-cpg3 CVE-2022-40146 HIGH Apache Batik vulnerable to Server-Side Request Forgery
GHSA-c5xv-qc8p-mh2v CVE-2022-38398 MODERATE Apache Batik Server-Side Request Forgery
GHSA-53jm-3hc9-fqqc CVE-2022-38648 MODERATE Apache Batik vulnerable to Server-Side Request Forgery
GHSA-rwqr-m72q-v6cm CVE-2022-42890 HIGH Untrusted code execution in Apache XML Graphics Batik
GHSA-25gw-4pcc-45cf CVE-2018-8013 CRITICAL Deserialization of Untrusted Data in Apache Batik
GHSA-r29w-r9ph-vm76 CVE-2022-41704 HIGH Apache XML Graphics Batik vulnerable to code execution via SVG.
GHSA-wfw6-mmmp-87xm CVE-2015-0250 MODERATE Improper Input Validation in Apache Batik
GHSA-qwgx-59jw-qfg9 CVE-2017-5662 HIGH Improper Restriction of XML External Entity Reference in Apache Batik
GHSA-cmx4-p4v5-hmr5 CVE-2019-17566 HIGH Server-side request forgery (SSRF) in Apache Batik

CVE-2022-40146 at a Glance

CVE Identifier CVE-2022-40146
GHSA Identifier GHSA-h4qg-p7r2-cpg3
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Batik
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.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:N/S:U/C:H/I:N/A:N).

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

How to Fix CVE-2022-40146

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

org.apache.xmlgraphics:batik fixed: 1.15
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik</artifactId>
    <version>1.15</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=org.apache.xmlgraphics

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apache.xmlgraphics

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

Note: The mvn dependency:tree -Dincludes=org.apache.xmlgraphics 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Batik, 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

Server-Side Request Forgery (SSRF) vulnerability in Batik of Apache XML Graphics allows an attacker to access files using a Jar url. This issue affects Apache XML Graphics Batik 1.14.

CVE-2022-40146 Affected Batik Versions

1 component(s)
Fixed Versions:
1.15
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.xmlgraphics:batik
Maven
≥ 1.0
< 1.15
1.15

References

Frequently Asked Questions

What is CVE-2022-40146?
CVE-2022-40146 is a security vulnerability in Batik involving Apache Batik vulnerable to Server-Side Request Forgery under CWE-918: Server-Side Request Forgery (SSRF).
Which Batik versions are affected?
Affected versions include releases prior to 1.15 across affected packages: org.apache.xmlgraphics:batik.
What version fixes CVE-2022-40146?
Upgrading to 1.15 (or the latest patched release for your respective branch) resolves the vulnerability.
Is batik affected?
Yes, org.apache.xmlgraphics:batik is affected in releases prior to 1.15. Upgrade your dependency to 1.15 or later.
What is the CVSS score of CVE-2022-40146?
CVE-2022-40146 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2022-40146?
CVE-2022-40146 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check Maven dependencies for CVE-2022-40146?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.xmlgraphics'. 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-h4qg-p7r2-cpg3",
  "modified" : "2025-11-03T22:29:21Z",
  "published" : "2022-09-23T00:00:40Z",
  "aliases" : [ "CVE-2022-40146" ],
  "summary" : "Apache Batik vulnerable to Server-Side Request Forgery",
  "details" : "Server-Side Request Forgery (SSRF) vulnerability in Batik of Apache XML Graphics allows an attacker to access files using a Jar url. This issue affects Apache XML Graphics Batik 1.14.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.xmlgraphics:batik"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0"
      }, {
        "fixed" : "1.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-40146"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/xmlgraphics-batik"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/BATIK-1335"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/hxtddqjty2sbs12y97c8g7xfh17jzxsx"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2023/10/msg00021.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/07/msg00006.html"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202401-11"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-09-23T20:57:17Z",
    "nvd_published_at" : "2022-09-22T15:15:00Z"
  }
}