CVE-2026-145564: ClassGraph before 4.8.201, 5.0.3, and 6.0.3 DoS via Resource.load() Decompression
ClassGraph before 4.8.201, 5.x before 5.0.3, and 6.x before 6.0.3 contains a denial of service vulnerability that allows attackers to exhaust memory by supplying archives with unbounded deflated entries. Attackers can provide a crafted jar or zip whose small entry inflates to hundreds of megabytes when read via Resource.load(), Resource.open(), or getContentAsString(), crashing the scanning JVM with an OutOfMemoryError.
Affected Software
Event History
Frequently Asked Questions
Which applications are most exposed to this issue?
Applications that scan or read attacker-supplied JAR or ZIP archives with ClassGraph are exposed when they use Resource.load(), Resource.open(), or getContentAsString(). A crafted archive can cause the scanning JVM to run out of memory.
What does an attacker need to exploit the vulnerability?
The attacker needs a way to provide a crafted JAR or ZIP archive to the application and have the application read a deflated entry through one of the affected Resource methods. No privileges or user interaction are required according to the supplied vector.
Which ClassGraph versions need to be updated?
Update ClassGraph to 4.8.201 or later in the 4.x line, 5.0.3 or later in the 5.x line, or 6.0.3 or later in the 6.x line. Earlier versions in those ranges are affected.
How can I determine whether an application is affected?
Check the resolved Maven dependency version for io.github.classgraph:classgraph, then identify whether the application calls Resource.load(), Resource.open(), or getContentAsString() on content originating from JAR or ZIP archives. Versions before the listed fixed releases should be treated as affected when those methods process untrusted archives.