大家好,
最近 Log4j 被发现有灾难性的安全漏洞:Log4Shell: RCE 0-day exploit found in log4j 2, a popular Java logging package | LunaSec
Jmix 框架,包括 CUBA,没有直接使用 Log4j 的库,也没有通过传递依赖将其引入。如果运行下面的命令:
./gradlew dependencies | grep log4j
则可以看到有以下依赖,但这些是接口适配器:
org.apache.logging.log4j:log4j-1.2-api:2.14.1
org.apache.logging.log4j:log4j-to-slf4j:2.14.1
Log4j 的漏洞位于 log4j-core
内。如果您使用了标准 Jmix 插件之外的依赖库,那么有潜在的引入该漏洞库的危险。所以建议通过上面的方法检查一下依赖库,或者直接检查部署好的系统服务。
如果您发现有对 log4j-core
模块的依赖,请马上升级您的项目使用最新版本的 Log4j。在 Jmix 应用程序中,可以在 build.gradle
中指定特定版本的依赖,比如:
dependencies {
implementation(platform("org.apache.logging.log4j:log4j-bom:2.15.0"))
// ...
Konstantin