CVE-2021-20190
Description
A flaw was found in jackson-databind before 2.9.10.7. FasterXML mishandles the interaction between serialization gadgets and typing. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Jackson-databind before 2.9.10.7 mishandles gadget-typing interaction, enabling remote code execution via untrusted data.
Analysis
The vulnerability resides in FasterXML jackson-databind versions prior to 2.9.10.7, where the deserialization framework fails to properly restrict the use of "serialization gadgets" when polymorphic type handling is enabled [1][2]. By allowing certain classes (e.g., from javax.swing) to be instantiated during deserialization, an attacker can chain gadgets to achieve arbitrary code execution.
To exploit this, an attacker must be able to supply untrusted JSON data to an application that uses jackson-databind with default typing or a custom typing configuration that permits dangerous classes [2]. The fix in commit [3] adds more classes (e.g., MethodLocatingFactoryBean, BeanReferenceFactoryBean) to the blacklist, indicating that the prior list was incomplete. The attack does not require authentication if the input is exposed over a network.
Successful exploitation leads to remote code execution, potentially compromising data confidentiality, integrity, and availability. The Red Hat bug report [4] confirms this as a high-severity issue. The CVSS score, while not explicitly provided, would likely be critical given the impact.
The vulnerability is patched in jackson-databind version 2.9.10.7. Upgrading is the recommended mitigation. As a workaround, developers can disable default typing or implement a custom type resolver that restricts allowed classes [1].
- GitHub - FasterXML/jackson-databind: General data-binding package for Jackson: works on streaming API (core) implementation(s)
- NVD - CVE-2021-20190
- fix: merge fix from 2.9 branch #2653 #2658 #2659 #2660 #2662 #2664 #2… · FasterXML/jackson-databind@08fbfac
- mishandles the interaction between serialization gadgets and typing, related to javax.swing
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
com.fasterxml.jackson.core:jackson-databindMaven | >= 2.7.0, < 2.9.10.7 | 2.9.10.7 |
com.fasterxml.jackson.core:jackson-databindMaven | < 2.6.7.5 | 2.6.7.5 |
Affected products
4- FasterXML/jackson-databinddescription
- osv-coords3 versionspkg:bitnami/nifipkg:maven/com.fasterxml.jackson.core/jackson-databindpkg:rpm/suse/jackson-databind&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP2
>= 1.7.0, <= 1.12.1+ 2 more
- (no CPE)range: >= 1.7.0, <= 1.12.1
- (no CPE)range: >= 2.7.0, < 2.9.10.7
- (no CPE)range: < 2.10.5.1-3.3.2
Patches
208fbfacf89a4fix: merge fix from 2.9 branch #2653 #2658 #2659 #2660 #2662 #2664 #2666 #2670 #2680 #2682 #2688 #2698 #2704 #2765 #2798 #2814 #2826 #2827 #2854 (#2858)
1 file changed · +78 −11
src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java+78 −11 modified@@ -48,6 +48,9 @@ public class SubTypeValidator // [databind#1737]; 3rd party //s.add("org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor"); // deprecated by [databind#1855] s.add("org.springframework.beans.factory.config.PropertyPathFactoryBean"); + // [databind#2680] + s.add("org.springframework.aop.config.MethodLocatingFactoryBean"); + s.add("org.springframework.beans.factory.config.BeanReferenceFactoryBean"); // s.add("com.mchange.v2.c3p0.JndiRefForwardingDataSource"); // deprecated by [databind#1931] // s.add("com.mchange.v2.c3p0.WrapperConnectionPoolDataSource"); // - "" - @@ -73,24 +76,26 @@ public class SubTypeValidator s.add("com.sun.deploy.security.ruleset.DRSHelper"); s.add("org.apache.axis2.jaxws.spi.handler.HandlerResolverImpl"); - // [databind#2186]: yet more 3rd party gadgets + // [databind#2186], [databind#2670]: yet more 3rd party gadgets s.add("org.jboss.util.propertyeditor.DocumentEditor"); s.add("org.apache.openjpa.ee.RegistryManagedRuntime"); s.add("org.apache.openjpa.ee.JNDIManagedRuntime"); - s.add("org.apache.axis2.transport.jms.JMSOutTransportInfo"); - - // [databind#2326] (2.7.9.6): one more 3rd party gadget + s.add("org.apache.openjpa.ee.WASRegistryManagedRuntime"); // [#2670] addition + s.add("org.apache.axis2.transport.jms.JMSOutTransportInfo"); + + // [databind#2326] (2.9.9) s.add("com.mysql.cj.jdbc.admin.MiniAdmin"); - // [databind#2334]: logback-core + // [databind#2334]: logback-core (2.9.9.1) s.add("ch.qos.logback.core.db.DriverManagerConnectionSource"); - // [databind#2341]: jdom/jdom2 + // [databind#2341]: jdom/jdom2 (2.9.9.1) s.add("org.jdom.transform.XSLTransformer"); s.add("org.jdom2.transform.XSLTransformer"); - // [databind#2387]: EHCache + // [databind#2387], [databind#2460]: EHCache s.add("net.sf.ehcache.transaction.manager.DefaultTransactionManagerLookup"); + s.add("net.sf.ehcache.hibernate.EhcacheJtaTransactionManagerLookup"); // [databind#2389]: logback/jndi s.add("ch.qos.logback.core.db.JNDIConnectionSource"); @@ -107,8 +112,10 @@ public class SubTypeValidator s.add("org.apache.commons.configuration.JNDIConfiguration"); s.add("org.apache.commons.configuration2.JNDIConfiguration"); - // [databind#2469]: xalan2 + // [databind#2469]: xalan s.add("org.apache.xalan.lib.sql.JNDIConnectionPool"); + // [databind#2704]: xalan2 + s.add("com.sun.org.apache.xalan.internal.lib.sql.JNDIConnectionPool"); // [databind#2478]: comons-dbcp, p6spy s.add("org.apache.commons.dbcp.datasources.PerUserPoolDataSource"); @@ -129,15 +136,75 @@ public class SubTypeValidator // [databind#2631]: shaded hikari-config s.add("org.apache.hadoop.shaded.com.zaxxer.hikari.HikariConfig"); - // [databind#2634]: ibatis-sqlmap, anteros-core + // [databind#2634]: ibatis-sqlmap, anteros-core/-dbcp s.add("com.ibatis.sqlmap.engine.transaction.jta.JtaTransactionConfig"); s.add("br.com.anteros.dbcp.AnterosDBCPConfig"); + // [databind#2814]: anteros-dbcp + s.add("br.com.anteros.dbcp.AnterosDBCPDataSource"); - // [databind#2642]: javax.swing (jdk) + // [databind#2642][databind#2854]: javax.swing (jdk) s.add("javax.swing.JEditorPane"); + s.add("javax.swing.JTextPane"); - // [databind#2648]: shire-core + // [databind#2648], [databind#2653]: shire-core s.add("org.apache.shiro.realm.jndi.JndiRealmFactory"); + s.add("org.apache.shiro.jndi.JndiObjectFactory"); + + // [databind#2658]: ignite-jta (, quartz-core) + s.add("org.apache.ignite.cache.jta.jndi.CacheJndiTmLookup"); + s.add("org.apache.ignite.cache.jta.jndi.CacheJndiTmFactory"); + s.add("org.quartz.utils.JNDIConnectionProvider"); + + // [databind#2659]: aries.transaction.jms + s.add("org.apache.aries.transaction.jms.internal.XaPooledConnectionFactory"); + s.add("org.apache.aries.transaction.jms.RecoverablePooledConnectionFactory"); + + // [databind#2660]: caucho-quercus + s.add("com.caucho.config.types.ResourceRef"); + + // [databind#2662]: aoju/bus-proxy + s.add("org.aoju.bus.proxy.provider.RmiProvider"); + s.add("org.aoju.bus.proxy.provider.remoting.RmiProvider"); + + // [databind#2664]: activemq-core, activemq-pool, activemq-pool-jms + + s.add("org.apache.activemq.ActiveMQConnectionFactory"); // core + s.add("org.apache.activemq.ActiveMQXAConnectionFactory"); + s.add("org.apache.activemq.spring.ActiveMQConnectionFactory"); + s.add("org.apache.activemq.spring.ActiveMQXAConnectionFactory"); + s.add("org.apache.activemq.pool.JcaPooledConnectionFactory"); // pool + s.add("org.apache.activemq.pool.PooledConnectionFactory"); + s.add("org.apache.activemq.pool.XaPooledConnectionFactory"); + s.add("org.apache.activemq.jms.pool.XaPooledConnectionFactory"); // pool-jms + s.add("org.apache.activemq.jms.pool.JcaPooledConnectionFactory"); + + // [databind#2666]: apache/commons-jms + s.add("org.apache.commons.proxy.provider.remoting.RmiProvider"); + + // [databind#2682]: commons-jelly + s.add("org.apache.commons.jelly.impl.Embedded"); + + // [databind#2688]: apache/drill + s.add("oadd.org.apache.xalan.lib.sql.JNDIConnectionPool"); + + // [databind#2698]: weblogic w/ oracle/aq-jms + // (note: dependency not available via Maven Central, but as part of + // weblogic installation, possibly fairly old version(s)) + s.add("oracle.jms.AQjmsQueueConnectionFactory"); + s.add("oracle.jms.AQjmsXATopicConnectionFactory"); + s.add("oracle.jms.AQjmsTopicConnectionFactory"); + s.add("oracle.jms.AQjmsXAQueueConnectionFactory"); + s.add("oracle.jms.AQjmsXAConnectionFactory"); + + // [databind#2764]: org.jsecurity: + s.add("org.jsecurity.realm.jndi.JndiRealmFactory"); + + // [databind#2798]: com.pastdev.httpcomponents: + s.add("com.pastdev.httpcomponents.configuration.JndiConfiguration"); + + // [databind#2826], [databind#2827] + s.add("com.nqadmin.rowset.JdbcRowSetImpl"); + s.add("org.arrah.framework.rdbms.UpdatableJdbcRowsetImpl"); DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s); }
7dbf51bf78d1Fix #2854
2 files changed · +7 −1
release-notes/VERSION-2.x+5 −0 modified@@ -4,6 +4,11 @@ Project: jackson-databind === Releases === ------------------------------------------------------------------------ +2.9.10.7 (not yet released) + +#2854: Block one more gadget type (javax.swing, CVE-2020-xxx) + (reported by Yangkun(ICSL)) + 2.9.10.6 (24-Aug-2020) #2798: Block one more gadget type (xxx, CVE-xxxx-xxx)
src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java+2 −1 modified@@ -143,8 +143,9 @@ public class SubTypeValidator // [databind#2814]: anteros-dbcp s.add("br.com.anteros.dbcp.AnterosDBCPDataSource"); - // [databind#2642]: javax.swing (jdk) + // [databind#2642][databind#2854]: javax.swing (jdk) s.add("javax.swing.JEditorPane"); + s.add("javax.swing.JTextPane"); // [databind#2648], [databind#2653]: shire-core s.add("org.apache.shiro.realm.jndi.JndiRealmFactory");
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
12- github.com/advisories/GHSA-5949-rw7g-wx7wghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-20190ghsaADVISORY
- bugzilla.redhat.com/show_bug.cgighsax_refsource_MISCWEB
- github.com/FasterXML/jackson-databind/commit/08fbfacf89a4a4c026a6227a1b470ab7a13e2e88ghsaWEB
- github.com/FasterXML/jackson-databind/commit/7dbf51bf78d157098074a20bd9da39bd48c18e4aghsaWEB
- github.com/FasterXML/jackson-databind/issues/2854ghsax_refsource_MISCWEB
- lists.apache.org/thread.html/r380e9257bacb8551ee6fcf2c59890ae9477b2c78e553fa9ea08e9d9a%40%3Ccommits.nifi.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/r380e9257bacb8551ee6fcf2c59890ae9477b2c78e553fa9ea08e9d9a@%3Ccommits.nifi.apache.org%3EghsaWEB
- lists.debian.org/debian-lts-announce/2021/04/msg00025.htmlghsamailing-listx_refsource_MLISTWEB
- security.netapp.com/advisory/ntap-20210219-0008ghsaWEB
- security.netapp.com/advisory/ntap-20210219-0008/mitrex_refsource_CONFIRM
- www.oracle.com//security-alerts/cpujul2021.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.