【发布时间】:2020-12-16 22:26:55
【问题描述】:
Sonarqube 正在寻找核心漏洞。如何解决。
"textRange": {
"startLine": 1,
"endLine": 1,
"startOffset": 0,
"endOffset": 38
},
"flows": [],
"status": "OPEN",
"message": "Filename: test-0.0.1-SNAPSHOT.jar: undertow-core-2.0.29.Final.jar
| Reference: CVE-2020-1745 | CVSS Score: 9.8 | Category: CWE-200 | A file inclusion
vulnerability was found
in the AJP connector enabled with a default AJP configuration port of 8009 in
Undertow version 2.0.29.Final and before and was fixed in 2.0.30.Final. A remote,
unauthenticated attacker could exploit this vulnerability to read web application files
from a vulnerable server. In instances where the vulnerable server allows file uploads,
an attacker could upload malicious JavaServer Pages (JSP) code within a variety of file
types and trigger this vulnerability to gain remote code execution.",
Undertow 在 pom 上不可用,因为它是另一个依赖项的子项(spring-boot-starter-undertow,已更新到最新版本的 2.3.3.RELEASE)。有没有办法让 spring-boot-starter 有特定版本的 undertow?
[INFO] +- org.springframework.boot:spring-boot-starter-undertow:jar:2.3.3.RELEASE:compile
[INFO] | +- io.undertow:undertow-core:jar:2.0.29.Final:compile
[INFO] | | +- org.jboss.xnio:xnio-api:jar:3.3.8.Final:compile
[INFO] | | \- org.jboss.xnio:xnio-nio:jar:3.3.8.Final:runtime
[INFO] | +- io.undertow:undertow-servlet:jar:2.0.29.Final:compile
[INFO] | +- io.undertow:undertow-websockets-jsr:jar:2.0.29.Final:compile
[INFO] | | \- org.jboss.spec.javax.websocket:jboss-websocket-api_1.1_spec:jar:1.1.4.Final:compile
[INFO] | +- jakarta.servlet:jakarta.servlet-api:jar:4.0.3:compile
[INFO] | \- org.glassfish:jakarta.el:jar:3.0.3:compile
【问题讨论】:
-
上面写着:您使用的是易受攻击的版本。更新。它甚至会具体告诉您哪个新版本修复了该漏洞。
-
@chrylis-cautiouslyoptimistic- 在 pom 上不提供 Undertow。
-
您的 spring boot 启动器已过时。您使用的是 2.1.0,最新版本是 2.3.3...
-
是时候了解传递依赖了。
-
您可以尝试使用 maven 排除从启动程序中排除 undertow,然后导入 undertow-core 2.0.30,但我不确定这是否可行。
标签: java spring security sonarqube