当前位置: 首页 > 知识库问答 >
问题:

Sonarqube正在进行核心漏洞查找。如何解决

水渊
2023-03-14
   "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版本的最新版本)。有没有一种方法,我可以使Spring启动有一个特定的版本下拖?



[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

共有1个答案

法弘亮
2023-03-14

如果需要一个特定版本的Undertow,只需将其包含在pom.xml中:

<dependency>
  <groupId>io.undertow</groupId>
  <artifactId>undertow-core</artifactId>
  <version>2.0.30.Final</version>
</dependency>

通过这样做,您将覆盖可能通过其他依赖项获得的任何其他版本(包括Spring的版本)。

如果您需要的版本已经包含在某些其他包的依赖项中,并且您希望Spring使用该版本(而不是手动覆盖pom中的每个Undertow依赖项),则可以尝试仅排除Starter提供的版本:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-actuator</artifactId>
    <version>2.3.3.RELEASE</version> <!-- already includes undertow 2.0.30 -->
</dependency>
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-undertow</artifactId>
  <version>2.3.3.RELEASE</version>
  <exclusions>
    <exclusion>
      <groupId>io.undertow</groupId>
      <artifactId>undertow-core</artifactId>
    </exclusion>
  </exclusions>
</dependency>
 类似资料:
  • 如何检测SonarQube LTS 8.2版本中的log4j漏洞。 我尝试了这个社区参考,但是找不到8.2版本的。 https://community.sonarsource.com/t/sonarqube-sonarcloud-and-the-log4j-vulnerability/54721

  • Weblogic版本12.1.3.0.0和JDK 1.8.0_101-B13中的NodeManager服务存在以下漏洞 有什么意见/建议吗?

  • 该版本现已分配给CVE-2022-22965。除了下面的好答案之外,请查看Spring Framework RCE:早期发布,因为它是本期最可靠和最新的网站。 根据不同的来源,我们在使用Spring Core库时似乎遇到了严重的安全问题。 https://securityboulevard.com/2022/03/new-spring4shell-zero-day-vulnerability-co

  • 讲师:gh0stkey 整理:飞龙 协议:CC BY-NC-SA 4.0 任意密码找回 这是补天平台上的一个案例: http://www.118114.cn/reg.jsp 首先注册一个账号,然后找回。 我们收到的验证码是六位数。如果网站没有设置频率限制,或者最大尝试次数限制的话,那我们自然就会想到可以爆破它。 然后抓提交手机验证码的封包,我们可以看到没有任何图片验证码: 发送到 Burp 的 I

  • 在我创建了一个新的Angular 12.0.3项目后,立即检测到8个高漏洞和40个中等漏洞。 当尝试使用修复问题时,没有任何变化。将漏洞减少到9个中度漏洞和7个高度漏洞,但当我尝试运行项目时,由于版本不匹配,会显示以下错误: 我已经尝试按照此答案中描述的解决方案修复漏洞,但这破坏了项目。 此外,我使用angle-cli的v11-lts创建了一个项目,但同样的问题伴随着不同的漏洞: 有没有办法,修复

  • 我使用的是带有Scala 2.12的Databricks群集版本7.3 LTS。这个版本确实使用Log4J。 官方文件说它使用Log4J版本。这是否意味着我没有这个漏洞?如果我这样做了,我可以在集群上手动修补它,还是需要将集群升级到下一个LTS版本?