Jackson Polymorphic Deserialization Can Enable SSRF and Remote Code Execution
Vulnerability Disclosure · 3 sources · Updated 3mo ago · First seen Jul 22, 2019

Jackson applications that deserialize attacker-controlled JSON with insecure polymorphic type handling can be coerced into instantiating dangerous classes. Research tracked as CVE-2019-12384 showed that ch.qos.logback.core.db.DriverManagerConnectionSource can be used as a gadget to initiate attacker-selected JDBC connections, creating server-side request forgery (SSRF) and denial-of-service exposure.
Where the H2 JDBC driver is available, a crafted JDBC URL using H2's INIT=RUNSCRIPT capability can load a remote SQL script and escalate the condition to remote code execution. Jackson's historic reliance on a denylist of known gadget classes means newly identified gadgets may remain exploitable until blocked; organizations should avoid unsafe polymorphic/default typing for untrusted input, update Jackson and dependent Java libraries, and review applications for exposed deserialization endpoints.
Why it matters
Impact assessment
Applications that deserialize attacker-controlled JSON with Jackson global default typing or similarly permissive polymorphic type handling are exposed. The required conditions are untrusted input, attacker-controlled type metadata, an exploitable gadget on the runtime classpath, and a Jackson configuration/version that permits that gadget.
The impact ranges from server-side request forgery and denial of service to remote code execution. SSRF can expose internal services and cloud metadata endpoints; the demonstrated H2 path can execute operating-system commands under the affected Java process account. This is a configuration- and dependency-dependent exposure rather than a universal Jackson compromise, and the supplied references do not report active exploitation in the wild.
Affected populations and exposure
- Java applications using
com.fasterxml.jackson.databind.ObjectMapperto process untrusted JSON. - Applications enabling global polymorphic/default typing, including historic
enableDefaultTyping()usage and permissiveactivateDefaultTyping()configurations. - Deployments with
logback-corecontainingch.qos.logback.core.db.DriverManagerConnectionSourceand one or more JDBC drivers. - Deployments with the H2 JDBC driver are at elevated risk because H2
INIT=RUNSCRIPTcan be used in the documented SSRF-to-RCE chain. - Internet-facing APIs, message consumers, and file-import services accepting JSON are the highest-priority review targets.
Business consequences
- Internal network access, service probing, and access to sensitive endpoints through SSRF.
- Process exhaustion or service interruption through attacker-induced JDBC connection activity.
- Full application-server compromise where the H2-based code-execution chain is viable.
- Potential data theft, lateral movement, operational disruption, and reputational damage following server compromise.


