• 云服务--漏洞修复


    1、Spring Security 身份认证绕过漏洞(CVE-2022-22978)

    Spring Security是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架。
    Spring Security存在身份认证绕过漏洞 ,当Spring Security中使用RegexRequestMatcher进行权限配置,且规则中使用带点号的正则表达式时,未经授权的远程攻击者可通过构造恶意数据包绕过身份认证,导致配置的权限验证失效。

    5359f7f095984fa4a068c80c2ea25895.png

     处理流程如下:

    第一步:IDEA新建mvn指令,查询jar包结构

    【spring-boot-starter-security版本是继承spring-boot-dependencies的版本】

    1fbdb02b7f284f45a83ea3fff68fb87c.png

    第二步:因为我们当前boot版本是2.5.7

    1. <parent>
    2. <groupId>org.springframework.bootgroupId>
    3. <artifactId>spring-boot-starter-parentartifactId>
    4. <version>2.5.7version>
    5. <relativePath/>
    6. parent>
    第三步:spring-security-web的jar包是基于如下pom的
    1. <dependency>
    2. <groupId>org.springframework.bootgroupId>
    3. <artifactId>spring-boot-starter-securityartifactId>
    4. dependency>

    第四步:我们直接将如下pom引用注释,强制新增如下pom引用:

    1. <dependency>
    2. <groupId>org.springframework.securitygroupId>
    3. <artifactId>spring-security-webartifactId>
    4. <version>5.6.4version>
    5. dependency>
    6. <dependency>
    7. <groupId>org.springframework.securitygroupId>
    8. <artifactId>spring-security-cryptoartifactId>
    9. <version>5.6.4version>
    10. dependency>
    11. <dependency>
    12. <groupId>org.springframework.securitygroupId>
    13. <artifactId>spring-security-coreartifactId>
    14. <version>5.6.4version>
    15. dependency>
    16. <dependency>
    17. <groupId>org.springframework.securitygroupId>
    18. <artifactId>spring-security-configartifactId>
    19. <version>5.6.4version>
    20. dependency>

     2、FastJSON<=1.2.80 反序列化漏洞(CVE-2022-25845)

    FastJSON是阿里巴巴的开源JSON解析库,它可以解析JSON格式的字符串,支持将Java Bean序列化为JSON字符串,也可以从JSON字符串反序列化到JavaBean。由于具有执行效率高的特点,应用范围广泛。
    FastJSON 存在反序列化远程代码执行漏洞,漏洞成因是Fastjson autoType开关的限制可被绕过,然后反序列化有安全风险的类。攻击者利用该漏洞可实现在目标机器上的远程代码执行。

    d0a987718f844f14a9b26114b6851642.png 

     处理流程如下:

     直接将之前版本换成83版本,调试即可

    1. <dependency>
    2. <groupId>com.alibabagroupId>
    3. <artifactId>fastjsonartifactId>
    4. <version>1.2.83version>
    5. dependency>

     3、Apache Commons Text 远程代码执行漏洞(CVE-2022-42889)

    Apache Commons Text 是一个专注于字符串算法的库。
    Apache Commons Text 存在远程代码执行漏洞,Apache Commons Text 执行变量插值,允许动态评估和扩展属性。在1.5到1.9版本中,包括一些默认的插值器,如果使用不受信任的配置值,则在受影响版本中使用插值默认值的应用程序可能容易受到远程代码执行的攻击。

    56ae12355ec9418e8405c41afc3d540e.png 

     处理流程如下:

     第一步:查询jar包关联

    e9660e7f98fd401e99bf9496f0801066.png

    第二步:需要升级成1.10,即对opencsv版本进行升级

    4ea981e918b24171b1932019487ae457.png

    第三步:升级opencsv版本后测试导入功能,正常即可

    1. <dependency>
    2. <groupId>com.opencsvgroupId>
    3. <artifactId>opencsvartifactId>
    4. <version>5.7.1version>
    5. dependency>

     

     

     

  • 相关阅读:
    Oracle-表空间管理
    Mybatis关联(嵌套)查询与延迟加载
    GPT-4并非世界模型,LeCun双手赞同!ACL力证LLM无法模拟真实世界
    Mysql中自增主键是如何工作的
    微信公众号密码转换的密钥
    作业39 sqrt应用
    Python批量保存Excel文件中的图表为图片
    攻防世界心仪的公司
    Java:SpringBoot整合JDBC实现对数据库的CURD增删改查
    QT安装完加入VTK例子报错总结
  • 原文地址:https://blog.csdn.net/Knight_Key/article/details/127927533