Cloudanix VulnDB

CVE-2022-41704

High · 7.5

CVSS

7.5

EPSS

3.1%

Published

Oct 25, 2022

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A graphics library used by many programs can let attackers run harmful code simply by getting the system to open a specially made picture file.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Library
Class
SSRF
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Allows execution of arbitrary untrusted Java code when processing a malicious SVG file via Batik.

Why it matters to the business

Remote attackers can compromise systems that render or process SVG graphics, potentially leading to data exposure or full system control without user interaction.

How an attack unfolds

An attacker supplies a crafted SVG containing Java code references that Batik executes during parsing, bypassing intended sandboxing or restrictions in applications using the library.

How to fix it

Upgrade Apache Batik to version 1.16 or apply the fix in commit 8e94aaaf3872a670040c6faebe82c907cb380fad; review and rebuild all dependent applications.

How to confirm the fix worked

Confirm the installed Batik version is 1.16 or later via dependency inspection or manifest checks; test SVG processing with known-safe inputs.

Typical attack path

  1. Identify an application that accepts or processes SVG files using vulnerable Batik
  2. Craft and deliver a malicious SVG payload
  3. Trigger SVG parsing in Batik
  4. Achieve arbitrary Java code execution on the host

How to detect it

Review application logs for SVG processing events from untrusted sources and correlate with unexpected process spawns or Java class loading anomalies.

What your security team should do

  • Prioritize upgrade of all Batik instances to the fixed version
  • Inventory applications that consume SVG input and restrict untrusted sources
  • Monitor dependency update pipelines for future Batik releases

The record

A vulnerability in Batik of Apache XML Graphics allows an attacker to run untrusted Java code from an SVG. This issue affects Apache XML Graphics prior to 1.16. It is recommended to update to version 1.16.

Affected packages

Ecosystem Package Introduced Fixed
Maven org.apache.xmlgraphics:batik 0 1.16
Debian:10 batik 0 1.10-2+deb10u2
Debian:11 batik 0 1.12-4+deb11u1
Debian:12 batik 0 1.16+dfsg-1
Debian:13 batik 0 1.16+dfsg-1
Mageia:9 batik 0 1.14-4.1.mga9
SUSE:Linux Enterprise Module for Development Tools 15 SP5 xmlgraphics-batik 0 1.17-150200.4.7.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 xmlgraphics-batik 0 1.17-2.7.1
Ubuntu:18.04:LTS batik 0 1.10-2~18.04.1
Ubuntu:20.04:LTS batik 0 1.12-1ubuntu0.1
Ubuntu:22.04:LTS batik 0 1.14-1ubuntu0.2
Ubuntu:24.04:LTS batik 0 No fix
Ubuntu:24.10 batik 0 No fix
Ubuntu:25.04 batik 0 No fix
Ubuntu:25.10 batik 0 No fix
Ubuntu:Pro:14.04:LTS batik 0 1.7.ubuntu-8ubuntu2.14.04.3+esm1
Ubuntu:Pro:16.04:LTS batik 0 1.8-3ubuntu1+esm1
maven org.apache.xmlgraphics/batik-dom 1.0 1.16
maven org.apache.xmlgraphics/batik-rasterizer 1.0 1.16
maven org.apache.xmlgraphics/batik-svgbrowser 1.0 1.16
openSUSE:Leap 15.5 xmlgraphics-batik 0 1.17-150200.4.7.1

Related vulnerabilities