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

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2019-14530 PoC — OpenEMR 路径遍历漏洞

来源
关联漏洞
标题: OpenEMR 路径遍历漏洞 (CVE-2019-14530)
Description:OpenEMR是OpenEMR社区的一套开源的医疗管理系统。该系统可用于医疗实践管理、电子医疗记录、处方书写和医疗帐单申请。 OpenEMR 5.0.2之前版本中的custom/ajax_download.php文件的‘fileName’参数存在路径遍历漏洞。攻击者可利用该漏洞下载任意文件。
Description
OpenEMR security issue
介绍
# CVE-2019-14530

Path traversal and DoS vulnerability in OpenEMR project

**Vulnerable function in file:** /openemr/custom/ajax_download.php

**Conditions:**
1. any authorized user
2. for DoS case: directory "/sites/default/documents/cqm_qrda/" must exists on server ( Due
to logic of "unlink()" function, path to file must consist only exsisting directories and file in it. )

**Vulnerable versions:** <5.0.2, Fixed in 5.0.2 version.

## Description

Vulnerable variable in this function: `fileName`, it can be controlled by attacker and there is no any filtration and validation of this. 

 An attacker can download any file (that is readable by the user www-data)
 from server storage. 
 
 If the requested file is writable for the www-data user
 and the directory `/var/www/openemr/sites/default/documents/cqm_qrda/`
 exists, it will be deleted from server. 
 
 Not exsisting directory is not big problem, since attacker can make it. Variable "higher_level_path" in upload function ` /openemr/controller.php?document&upload` allow us to provide directory name, where file will be stored, and if this directory not exists ( and "patient_id" variable is numeric and greater than 0 )it will be created with "700" rights and owned by "www-data" user.
 
 It can cause DoS, because attacker can delete some configs/php scripts from server.
 
 ## Impact
 
 Information disclosure. 
 
 Denial of service.
 
 ## Other
 
 [OpenEMR official site](https://www.open-emr.org/)
 
 [OpenEMR git repo](https://github.com/openemr)
 
 [Patch for this issue](https://github.com/openemr/openemr/pull/2592)

*P.S. Special thanks to  Brady G. Miller from OpenEMR team for fast response and patches*
文件快照

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

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