CVE-2018-12022: Deserialization of Untrusted Data (CWE-502)
value: An issue was discovered in FasterXML jackson-databind prior to 2.7.9.4, 2.8.11.2, and 2.9.6. When Default Typing is enabled (either globally or for a specific property), the service has the Jodd-db jar (for database access for the Jodd framework) in the classpath, and an attacker can provide an LDAP service to access, it is possible to make the service execute a malicious payload.
CWE description: The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
CVSS v3 base score: 7.5
Published: 2019-03-21T16:00Z
Repository: https://github.com/FasterXML/jackson-databind
Language: Other
Files changed: release-notes/VERSION, src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
Commit date: 2018-06-07 22:35:42 -0700
Commit message: Backport #2052, #2058 fixes for 2.7.9.4

Diff: diff --git a/release-notes/VERSION b/release-notes/VERSION
index 49e4fd87..f37c3b03 100644
--- a/release-notes/VERSION
+++ b/release-notes/VERSION
@@ -2,13 +2,15 @@ Project: jackson-databind
 
 ------------------------------------------------------------------------
 === Releases ===
 ------------------------------------------------------------------------
 
-2.7.9.4 (not yet released)
+2.7.9.4 (08-Jun-2018)
 
 #2032: Blacklist another serialization gadget (ibatis)
+#2052: CVE-2018-12022: Block polymorphic deserialization of types from Jodd-db library
+#2058: CVE-2018-12023: Block polymorphic deserialization of types from Oracle JDBC driver
 
 2.7.9.3 (11-Feb-2018)
 
 #1872 `NullPointerException` in `SubTypeValidator.validateSubType` when
   validating Spring interface
diff --git a/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java b/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
index cae5a9e9..23ec7284 100644
--- a/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
+++ b/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
@@ -55,10 +55,17 @@ public class SubTypeValidator
         s.add("org.apache.tomcat.dbcp.dbcp2.BasicDataSource");
         s.add("com.sun.org.apache.bcel.internal.util.ClassLoader");
         // [databind#2032]: more 3rd party; data exfiltration via xml parsed ext entities
         s.add("org.apache.ibatis.parsing.XPathParser");
 
+        // [databind#2052]: Jodd-db, with jndi/ldap lookup
+        s.add("jodd.db.connection.DataSourceConnectionProvider");
+
+        // [databind#2058]: Oracle JDBC driver, with jndi/ldap lookup
+        s.add("oracle.jdbc.connector.OracleManagedConnectionFactory");
+        s.add("oracle.jdbc.rowset.OracleJDBCRowSet");
+
         DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s);
     }
 
     /**
      * Set of class names of types that are never to be deserialized.

Vulnerable code: 2.7.9.4 (not yet released)
Fixed code: 2.7.9.4 (08-Jun-2018)
#2052: CVE-2018-12022: Block polymorphic deserialization of types from Jodd-db library
#2058: CVE-2018-12023: Block polymorphic deserialization of types from Oracle JDBC driver
        // [databind#2052]: Jodd-db, with jndi/ldap lookup
        s.add("jodd.db.connection.DataSourceConnectionProvider");

        // [databind#2058]: Oracle JDBC driver, with jndi/ldap lookup
        s.add("oracle.jdbc.connector.OracleManagedConnectionFactory");
        s.add("oracle.jdbc.rowset.OracleJDBCRowSet");