Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1110 CNY

100%

CVE-2019-16097 PoC — Harbor 权限许可和访问控制问题漏洞

Source
Associated Vulnerability
Title:Harbor 权限许可和访问控制问题漏洞 (CVE-2019-16097)
Description:core/api/user.go in Harbor 1.7.0 through 1.8.2 allows non-admin users to create admin accounts via the POST /api/users API, when Harbor is setup with DB as authentication backend and allow user to do self-registration. Fixed version: v1.7.6 v1.8.3. v.1.9.0. Workaround without applying the fix: configure Harbor to use non-DB authentication backend such as LDAP.
Description
harbor(<1.7.6/1.8.3) privilege escalation (CVE-2019-16097)
Readme
# harbor添加管理员漏洞检测工具




## 0x00 概述

201909 harbor爆出可利用注册功能添加管理员漏洞,利用注册接口api/users,构造post参数"has_admin_role":true,可直接添加管理员。

本工具支持单个url或批量检测。




## 0x01 需求

python2.7

pip install requests




## 0x02 快速开始

使用帮助: python harbor-give-me-admin.py -h


![](https://github.com/theLSA/harbor-give-me-admin/raw/master/demo/harbor01.png)



单url检测: python harbor-give-me-admin.py -u "https://www.xxx.com/"

//如利用成功,则会添加管理员帐号test00,谨慎操作!

![](https://github.com/theLSA/harbor-give-me-admin/raw/master/demo/harbor00.png)




批量检测: python harbor-give-me-admin.py -f urls,txt

//如利用成功,则会添加管理员帐号test00,谨慎操作!



## 0x03 反馈

[issus](https://github.com/theLSA/harbor-give-me-admin/issues)

gmail:[lsasguge196@gmail.com](mailto:lsasguge196@gmail.com)

qq:[2894400469@qq.com](mailto:2894400469@qq.com)



File Snapshot

[4.0K] /data/pocs/e87e0b54b1dd887c138d11b9d00c7fa0d0b38d24 ├── [4.0K] batch_result │   └── [4.0K] 20191002174035 │   └── [ 0] success-checked.txt ├── [4.0K] demo │   ├── [6.2K] harbor00.png │   └── [3.8K] harbor01.png ├── [4.0K] harbor-give-me-admin.py ├── [1.0K] LICENSE ├── [1.0K] README.md └── [ 0] urls.txt 3 directories, 7 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →