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

Spring boot 2.6.7与Spring cloud上下文3.1.1、CVE-2022-22965不兼容

伍光济
2023-03-14

我们想将Spring boot升级到2.6.7以解决CVE-2022-22965。这需要spring-cloud 2021.0.1,其中包括spring-cloud-上下文3.1.1(最新版本)。这组模块会导致以下运行时错误:

Your project setup is incompatible with our requirements due to following reasons:

- Spring Boot [2.6.7] is not compatible with this Spring Cloud release train


Action:

Consider applying the following actions:

- Change Spring Boot version to one of the following versions [2.2.x, 2.3.x] .

此外,Spring Cloud上下文在Maven存储库中被标记为易受CVE-2022-22965,我们正在尝试修复。

忽略spring云上下文会导致以下错误:

org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'configurationPropertiesBeans'
  defined in class path resource
[org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]:
  Post-processing of merged bean definition failed;
  nested exception is java.lang.IllegalStateException:
  Failed to introspect Class
[org.springframework.cloud.context.properties.ConfigurationPropertiesBeans]
  from ClassLoader
  [org.springframework.boot.loader.LaunchedURLClassLoader@3d646c37]

应该使用哪个版本的spring云配置,或者什么时候可以使用新版本?有关我们如何实现这一组合的链接:

  • Spring Boot 2.6.6现已推出,我们已将其升级到2.6.7

对于完整的上下文,我们的应用程序使用以下Spring包:

  • Spring-boot-starter-父,2.6.7
    • Spring启动启动
    • Spring-启动-执行
    • Spring-引导-执行器-自动配置
    • Spring-引导-启动-web

共有2个答案

荣轶
2023-03-14

你试过使用3.1.0org.springframework.cloud.对我来说,这个错误得到了解决,但我的一些测试用例失败了

史懿轩
2023-03-14

只需在中将Spring Cloud版本更改为2021.0.1--

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

  • 我用的是spring 5.3.16,spring boot 2.2.10.RELEASE,spring cloud 2.2.10.RELEASE用的是spring-cloud-网飞-zuul,那么,我可以只升级spring版本到5.3.18,而不升级其他框架吗?

  • 如果使用Java 8,我的系统是否会受到spring4shell漏洞的影响? 配置

  • 是否存在CVE-2022-21449可能导致黑客/滥用的情况? 我在spring security和java的github repo上展示了这一点。安全性被广泛使用,但我不知道库中的使用如何导致安全缺陷。

  • 创建图文 功能介绍:学员购买后能随时在线阅读文章内容。 适用场景:适合文字和图片较多,或者短视频、音频的付费内容。 步骤 从【付费阅读】→【文章】→【新建文章】,进入文章编辑页面。 选择文章类型、文章分类,填写标题、详情、是否付费等信息,并上传封面。 点击【立即创建】即可成功创建文章。

  • 我对CVE-2022-22950和相应的Spring建议有点困惑。后者表示,可以通过以下方式利用该漏洞: […]巧尽心思构建的SpEL表达式[…] 但是,允许用户制作SpEL表达式的应用程序允许这些用户做几乎任何事情。包括代码注入,它对机密性、完整性和可用性有充分的影响。这里还有很多其他DoS机会。以这个SpEL片段为例,它执行命令: 这个命令是相当无害的,但它可以被任何东西替代!现在,SpEL支