CVE-2022-41704
High · 7.5CVSS
7.5
EPSS
3.1%
Published
Oct 25, 2022
CISA due date
—
Cloudanix analysis
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
- Identify an application that accepts or processes SVG files using vulnerable Batik
- Craft and deliver a malicious SVG payload
- Trigger SVG parsing in Batik
- 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
- CVE-2017-5662 In Apache Batik before 1.9, files lying on the filesystem of the server which uses batik… Also affects org.apache.xmlgraphics:batik
- CVE-2015-0250 XML external entity (XXE) vulnerability in the SVG to (1) PNG and (2) JPG conversion… Also affects org.apache.xmlgraphics:batik
- CVE-2022-44730 Server-Side Request Forgery (SSRF) vulnerability in Apache Software Foundation Apache XML… Also affects batik
- CVE-2022-44729 Server-Side Request Forgery (SSRF) vulnerability in Apache Software Foundation Apache XML… Also affects batik
- CVE-2024-28168 Improper Restriction of XML External Entity Reference ('XXE') vulnerability in Apache XML… Also affects xmlgraphics-batik
- CVE-2026-114730 Roundcube Webmail 1.6.14 before 1.6.20 and 1.7.0 before 1.7.5 is affected by a… CWE-918
- CVE-2026-87953 Server-Side Request Forgery (SSRF) vulnerability in Drupal SAML SSO - Service Provider… CWE-918
- CVE-2026-114634 WWBN AVideo before 29.4.0 contains a blind server-side request forgery vulnerability in… CWE-918