openmrs/openmrs-core:test/pom.xml

Vulnerabilities

4 via 4 paths

Dependencies

39

Source

GitHub

Find, fix and prevent vulnerabilities in your code.

Severity
  • 2
  • 1
  • 1
Status
  • 4
  • 0
  • 0

high severity

Remote Code Execution (RCE)

  • Vulnerable module: com.h2database:h2
  • Introduced through: com.h2database:h2@1.4.200

Detailed paths

  • Introduced through: openmrs/openmrs-core@openmrs/openmrs-core com.h2database:h2@1.4.200

Overview

com.h2database:h2 is a database engine

Affected versions of this package are vulnerable to Remote Code Execution (RCE). It provides a web console for managing the database, and by default it does not have a password set. The CREATE ALIAS function calls a java code, allowing an attacker to execute arbitrary java code on projects running the h2 database.

PoC

CREATE ALIAS REVERSE AS $$ String reverse(String s) { return new StringBuilder(s).reverse().toString(); } $$;
CALL REVERSE('Test');

Remediation

There is no fixed version for com.h2database:h2.

References

high severity

XML External Entity (XXE) Injection

  • Vulnerable module: org.apache.xmlbeans:xmlbeans
  • Introduced through: org.dbunit:dbunit@2.7.0

Detailed paths

  • Introduced through: openmrs/openmrs-core@openmrs/openmrs-core org.dbunit:dbunit@2.7.0 org.apache.poi:poi-ooxml@3.17 org.apache.poi:poi-ooxml-schemas@3.17 org.apache.xmlbeans:xmlbeans@2.6.0

Overview

Affected versions of this package are vulnerable to XML External Entity (XXE) Injection. The XML parsers used by XMLBeans did not set the properties needed to protect the user from malicious XML input. Vulnerabilities include possibilities for XML Entity Expansion attacks.

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

Upgrade org.apache.xmlbeans:xmlbeans to version 3.0.0 or higher.

References

medium severity

XML External Entity (XXE) Injection

  • Vulnerable module: org.apache.poi:poi-ooxml
  • Introduced through: org.dbunit:dbunit@2.7.0

Detailed paths

  • Introduced through: openmrs/openmrs-core@openmrs/openmrs-core org.dbunit:dbunit@2.7.0 org.apache.poi:poi-ooxml@3.17

Overview

org.apache.poi:poi-ooxml is a Java API To Access Microsoft Format Files.

Affected versions of this package are vulnerable to XML External Entity (XXE) Injection. When using the tool XSSFExportToXml to convert user-provided Microsoft Excel documents, a specially crafted document can allow an attacker to read files from the local filesystem or from internal network resources via XML External Entity (XXE) Processing.

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

Upgrade org.apache.poi:poi-ooxml to version 4.1.0 or higher.

References

low severity

Information Exposure

  • Vulnerable module: commons-codec:commons-codec
  • Introduced through: org.dbunit:dbunit@2.7.0

Detailed paths

  • Introduced through: openmrs/openmrs-core@openmrs/openmrs-core org.dbunit:dbunit@2.7.0 org.apache.poi:poi-ooxml@3.17 org.apache.poi:poi@3.17 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.

References