Improper Neutralization of Special Elements Used in a Template Engine Affecting com.xuxueli:xxl-job-core package, versions [0,2.4.1)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.05% (17th 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-JAVA-COMXUXUELI-6579598
  • published 7 Apr 2024
  • disclosed 6 Apr 2024
  • credit Unknown

How to fix?

Upgrade com.xuxueli:xxl-job-core to version 2.4.1 or higher.

Overview

com.xuxueli:xxl-job-core is a distributed task scheduling framework.

Affected versions of this package are vulnerable to Improper Neutralization of Special Elements Used in a Template Engine via the deserialize() function in JdkSerializeTool.java, which accesses templates on the classpath with freemarker. An attacker in control of spring.freemarker.templateLoaderPath can inject a template to execute code when a given page is accessed.

PoC

${"freemarker.template.utility.ObjectConstructor"?new()("org.springframework.expression.spel.standard.SpelExpressionParser").parseExpression("T(java.lang.Runtime).getRuntime().exec("open -a calculator")").getValue()}

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
8.1 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High