QID 730416

Date Published: 2022-04-07

QID 730416: Spring Core Remote Code Execution (RCE) Vulnerability (Spring4Shell) (Unauthenticated Check)

The vulnerability exists in the Spring Framework with the JDK version greater or equal to 9.0. (If the version number is less than or equal to 8, it is not affected by the vulnerability.)
Triggering this vulnerability requires use of the Spring MVC and Spring WebFlux applications running on JDK9 and above.

Vulnerable Versions:
Spring framework versions 5.3.0 to 5.3.17, 5.2.0 to 5.2.19, and older are vulnerable.
Spring Boot versions prior to 2.6.6 and 2.5.12 that depend on Spring Framework 5.3.18.

QID Detection Logic:
The QID sends a specially crafted GET request "/?class.module.classLoader.resources.context.configFile=http://Scanner_IP:Random_port&class.module.classLoader.resources.context.configFile." to try and get a callback from vulnerable hosts.

A remote attacker can obtain the AccessLogValve object and malicious field values via the parameter binding function of the framework on the basis of meeting certain conditions

  • CVSS V3 rated as Critical - 9.8 severity.
  • CVSS V2 rated as High - 7.5 severity.
  • Solution
    The vendor has released an advisory to resolve these issues.

    Customers are advised to visit Spring Framework RCE for more information on this.
    Workaround:
    On network protection devices such as WAF, implement rule filtering for strings such as "class.*", "Class.*", "*.class.*", and "*.Class.*" according to the actual traffic situation of deployed services. After filtering the rules, test the business operation to avoid additional impact.

    Vendor References

    CVEs related to QID 730416

    Software Advisories
    Advisory ID Software Component Link
    Spring Framework URL Logo spring.io/blog/2022/03/31/spring-framework-rce-early-announcement