CVE-2017-5662
High · 7.3CVSS
7.3
EPSS
4.1%
Published
Apr 18, 2017
CISA due date
—
Cloudanix analysis
A flaw in an older graphics library could let attackers read private files on a server or crash the system by sending specially crafted image files.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- XXE
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability permits XML external entity (XXE) processing in SVG documents parsed by Apache Batik, allowing an attacker to read arbitrary files from the host filesystem or trigger denial-of-service amplification via crafted entity references.
Why it matters to the business
Attackers can steal sensitive files such as configuration or credentials, leading to data exposure or full server takeover when the application runs with elevated privileges; availability can also be disrupted through resource exhaustion.
How an attack unfolds
An attacker crafts a malicious SVG file containing XXE payloads that reference local files or external resources, submits it to any application using a vulnerable Batik version for rendering or processing, and receives the file contents or causes resource exhaustion in the response.
How to fix it
Upgrade Apache Batik to version 1.9 or later; disable external entity resolution in XML parsers where Batik is used; apply least-privilege execution contexts for the hosting application.
How to confirm the fix worked
Confirm the installed Batik JAR version is 1.9 or newer; attempt controlled XXE test payloads against SVG processing endpoints and verify that external entity expansion is rejected.
Typical attack path
- Identify an application endpoint that accepts or processes SVG files using Apache Batik
- Craft an SVG document embedding XXE entities pointing to local filesystem paths or external amplification targets
- Submit the malicious SVG to the vulnerable parser
- Receive leaked file contents or observe service degradation from the XXE-induced request amplification
How to detect it
Inspect application logs for XML parser errors or unexpected external entity references; correlate with file-access logs showing reads of sensitive paths by the application process; review web server access logs for SVG uploads followed by anomalous responses containing file contents.
What your security team should do
- Immediately upgrade all Apache Batik deployments to 1.9 or later
- Review and restrict file system permissions for processes that invoke Batik
- Add input validation or sanitization around SVG uploads and processing
- Monitor for unusual XML parsing activity or unexpected file access originating from the application
The record
In Apache Batik before 1.9, files lying on the filesystem of the server which uses batik can be revealed to arbitrary users who send maliciously formed SVG files. The file types that can be shown depend on the user context in which the exploitable application is running. If the user is root a full compromise of the server - including confidential or sensitive files - would be possible. XXE can also be used to attack the availability of the server via denial of service as the references within a xml document can trivially trigger an amplification attack.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Maven | org.apache.xmlgraphics:batik | 0 | 1.9 |
| Debian:11 | batik | 0 | 1.9-1 |
| Debian:12 | batik | 0 | 1.9-1 |
| Debian:13 | batik | 0 | 1.9-1 |
| Debian:7 | batik | 0 | 1.7+dfsg-3+deb7u2 |
| Debian:8 | batik | 0 | 1.7+dfsg-5+deb8u1 |
| Debian:9 | batik | 0 | 1.8-4+deb9u1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | xmlgraphics-batik | 0 | 1.17-2.7.1 |
| Ubuntu:14.04:LTS | batik | 0 | 1.7.ubuntu-8ubuntu2.14.04.2 |
| Ubuntu:18.04:LTS | batik | 0 | 1.9-3 |
| Ubuntu:Pro:16.04:LTS | batik | 0 | No fix |
Related vulnerabilities
- CVE-2022-41704 A vulnerability in Batik of Apache XML Graphics allows an attacker to run untrusted Java… 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-2026-89260 MoguBlog through 6.2 contains an XML external entity injection vulnerability in the… CWE-611
- CVE-2026-84941 An information disclosure vulnerability in the SAML Single Sign-On (SSO) functionality of… CWE-611
- CVE-2026-79572 An XXE (XML External Entity) vulnerability in the level-rule module of Distribution… CWE-611
- CVE-2026-19614 The API is prone to XML external entity (XXE) injection. CWE-611