### [CVE-2018-8013](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-8013) ![](https://img.shields.io/static/v1?label=Product&message=Apache%20Batik&color=blue) ![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue) ![](https://img.shields.io/static/v1?label=Vulnerability&message=Information%20Disclosure&color=brighgreen) ### Description 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. Fix was to check the class type before calling newInstance in deserialization. ### POC #### Reference - http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html - http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html - https://www.oracle.com/security-alerts/cpujul2020.html - https://www.oracle.com/security-alerts/cpuoct2020.html - https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html #### Github - https://github.com/PalindromeLabs/Java-Deserialization-CVEs - https://github.com/andir/nixos-issue-db-example