Critical Deserialization Vulnerability in Apache Batik: CVE-2018-8013

batik Updated 02 Oct 2025

Summary

24/05/2018
N/A
Yes i
Critical
9.8

CVE-2018-8013: In Apache Batik 1.x before 1.10, when deserializing subclass of AbstractDocument, the class takes a string from the inputStream as the class name which then use it to call the no-arg constructor of the class. Affects batik across 2 version ranges.

< 1.10-1 >= 1b708df57205a70c2c9fb8235ff5eab837609968, < 55a7e24c4f4713efa012263e2262d40238d0c633

Fixed in 1.10-1. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Apache Batik is a powerful toolkit for working with SVG (Scalable Vector Graphics) in Java. It provides a range of features for creating, manipulating, and rendering SVG content. The toolkit is widely used in applications that require vector graphics support. However, prior to version 1.10, Batik was susceptible to a deserialization vulnerability that could allow attackers to exploit the system by manipulating class names during the deserialization process.

Vulnerability Detail

CVE-2018-8013 is a deserialization vulnerability found in Apache Batik versions prior to 1.10. The issue arises when the system deserializes a subclass of AbstractDocument, taking a string from the input stream as the class name. This can lead to the instantiation of arbitrary classes, potentially allowing an attacker to execute malicious code. The vulnerability has a CVSS score of 9.8, indicating a critical severity level, which could result in unauthorized access, data corruption, or system compromise.

How To Fix

Minimum fixed version

1.10-1

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 upgrading is not immediately possible, consider implementing input validation to restrict the types of classes that can be deserialized. This can help mitigate the risk until a proper upgrade can be performed.

Conclusion

CVE-2018-8013 is a critical vulnerability in Apache Batik that poses significant risks to applications using the toolkit. It is essential for users to upgrade to version 1.10 or later to mitigate these risks. Regular monitoring for vulnerabilities, such as through tools like Vulert, can help maintain the security of your software.

See every vulnerability recorded for batik →

Share this vulnerability

FAQ

CVE-2018-8013 is a critical deserialization vulnerability in Apache Batik that allows attackers to exploit the system by manipulating class names during deserialization.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The CVSS score of CVE-2018-8013 is 9.8, indicating a critical severity level.

Exploitation of this vulnerability could lead to unauthorized access, data corruption, or complete system compromise.

To upgrade Apache Batik, update your dependency to version 1.10 or higher in your build configuration, then rebuild and test your application.

Related vulnerabilities

Recent vulnerabilities recorded for batik.

How To Fix

Minimum fixed version

1.10-1

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