XML External Entity (XXE) Vulnerability in Apache Batik: Risk of File Exposure and Denial of Service

batik Updated 02 Oct 2025

Summary

24/03/2015
N/A
Yes i
Unrated
Not published

CVE-2015-0250: XML external entity (XXE) vulnerability in the SVG to (1) PNG and (2) JPG conversion classes in Apache Batik 1.x before 1.8 allows remote attackers to read arbitrary files or cause a denial of service via a crafted SVG f... Affects batik versions < 1.7+dfsg-5. Fixed in 1.7+dfsg-5. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Apache Batik is a powerful toolkit for processing SVG (Scalable Vector Graphics) files. It allows users to convert SVG images into various formats such as PNG and JPG. However, prior to version 1.8, Batik was vulnerable to XML external entity (XXE) attacks, which could be exploited by malicious SVG files. This vulnerability could lead to unauthorized file access and potential denial of service, compromising the integrity and availability of the application.

Vulnerability Detail

The vulnerability, identified as CVE-2015-0250, arises from the way Apache Batik processes SVG files. Attackers can craft SVG files that include external entities, allowing them to read arbitrary files on the server or cause a denial of service by exploiting the XML parser. This issue is particularly concerning as it can lead to sensitive data exposure and application downtime, impacting both users and administrators.

How To Fix

Minimum fixed version

1.7+dfsg-5

This is the first release that contains the fix.

sudo apt-get install --only-upgrade batik

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate upgrading is not feasible, a temporary workaround is to disable external entity processing in the XML parser used by Batik. This can be done by configuring the parser settings to ignore external entities, although this may limit some functionalities of SVG processing.

Conclusion

The XML external entity vulnerability in Apache Batik poses significant risks to applications that process SVG files. It is crucial for users to upgrade to version 1.8 or later to mitigate these risks. Additionally, utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for batik →

Share this vulnerability

FAQ

CVE-2015-0250 is a vulnerability in Apache Batik that allows attackers to exploit XML external entities in SVG files, potentially leading to unauthorized file access and denial of service.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor and alert for open-source vulnerabilities without requiring any installation.

The risks include unauthorized access to sensitive files on the server and potential denial of service, which can disrupt application availability.

Yes, you can temporarily disable external entity processing in the XML parser settings to mitigate the risk until an upgrade can be performed.

More information about Apache Batik, including documentation and downloads, can be found on the official Apache Batik website.

Related vulnerabilities

Recent vulnerabilities recorded for batik.

How To Fix

Minimum fixed version

1.7+dfsg-5

This is the first release that contains the fix.

sudo apt-get install --only-upgrade batik

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback