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. Learn more

Threat Intelligence

EPSS
0.05% (18th 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 IDSNYK-JAVA-COMXUXUELI-6579598
  • published7 Apr 2024
  • disclosed6 Apr 2024
  • creditUnknown

Introduced: 6 Apr 2024

CVE-2024-3366  (opens in a new tab)
CWE-1336  (opens in a new tab)

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