# springfox-3.0.0-patch **Repository Path**: zhouxianli/springfox-3.0.0-patch ## Basic Information - **Project Name**: springfox-3.0.0-patch - **Description**: 基于springfox 3.0.0版本修复漏洞,解决无法升级SpringBoot 2.7但需要解决springfox安全漏洞的问题 - 修复QAXOSS-2020-056060漏洞(Springfox输入验证错误漏洞) - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-15 - **Last Updated**: 2025-08-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Springfox-3.0.0-patch ## 简介 Springfox 3.0.0版本最后一次更新是2020年7月,有些基于SpringBoot 2的应用还依赖它。组件扫描时发现有漏洞,可以通过修改日志配置解决漏洞,但组件扫描还是在报。 修改建议有相关源码提交:https://github.com/springfox/springfox/pull/3549/commits/19b0a9b676f54eb09d99c003a2a8f22cf2bc28c4,但不可能合并了,自己搞一下吧。 本想通过官方源码修改,但官方的gradle环境目前已经不完整了,执行gradlew时提示缺少组件,遗产组件深究没意义,通过替换class文件方式实现吧。 首先从https://repo1.maven.org/maven2/io/springfox/springfox-swagger2/3.0.0/ 下载官方3.0.0的jar包,再将demo项目编译后的2个java类替换,生成新的patch版本(如3.0.0-patch-1)。 ## 工具项目demo编译方式 基于JDK1.8编译 ```sh mvnw clean compile ``` ## 发布到本地私服 ```sh # 参数按实际情况修改,第一个参数为repositoryId(对应maven的config.xml中配置的服务器id),第二个参数为url,示例如下 deploy_lib.bat jsptz-maven-thirdparty http://xxx.xxx.xxx.xxx:8081/nexus/content/repositories/thirdparty ``` ## 使用方式 指定springfox-swagger2版本号为3.0.0-patch-1 ```xml io.springfox springfox-boot-starter 3.0.0 io.springfox springfox-swagger2 io.springfox springfox-swagger2 3.0.0-patch-1 ``` ## 版本与目标漏洞 ### 3.0.0-patch-1 ``` QAXOSS编号:QAXOSS-2020-056060 漏洞名称:Springfox输入验证错误漏洞 CVSS:未知 影响版本:springfox-swagger22.9.2、springfox-swagger22.10.5、springfox-swagger23.0.0、springfox-swagger22.7.0、springfox-swagger22.10.4、springfox-swagger22.10.0、springfox-swagger22.6.1、springfox-swagger22.10.1、springfox-swagger22.2.2 解决方案: 相关commit: - https://github.com/springfox/springfox/pull/3549/commits/19b0a9b676f54eb09d99c003a2a8f22cf2bc28c4 漏洞补丁: - https://github.com/springfox/springfox/pull/3549/commits/19b0a9b676f54eb09d99c003a2a8f22cf2bc28c4 参考方案: - A fix was pushed into the master branch but not yet published. ``` 官方原版License ------- Copyright 2015 Marty Pitt - [@martypitt](https://github.com/martypitt), Dilip Krishnan - [@dilipkrish](https://github.com/dilipkrish), Adrian Kelly - [@adrianbk](https://github.com/adrianbk), Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. License [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fspringfox%2Fspringfox.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fspringfox%2Fspringfox?ref=badge_large)