Saturday, April 5, 2025
HomeCVE/vulnerabilityHackers Actively Exploiting WordPress Plugin Arbitrary File Upload Vulnerability

Hackers Actively Exploiting WordPress Plugin Arbitrary File Upload Vulnerability

Published on

SIEM as a Service

Follow Us on Google News

Hackers have been actively exploiting a critical vulnerability in the WordPress plugin 简数采集器 (Keydatas).

The vulnerability, CVE-2024-6220, allows unauthenticated threat actors to upload arbitrary files to a vulnerable site, potentially leading to remote code execution and complete site takeover.

This alarming development underscores the importance of maintaining updated plugins and robust security measures.

Discovery and Initial Response

On June 18, 2024, during the 0-day Threat Hunt Promo of Wordfence’s Bug Bounty Program, a researcher known as Foxyyy discovered and responsibly reported the vulnerability.

The flaw was found in the Keydatas plugin, which has over 5,000 active installations. The vulnerability was quickly confirmed, and active exploitation attempts were observed within days.

CVE-2024-6220­ – Vulnerability Details

The vulnerability summary from Wordfence Intelligence reveals a critical flaw in the 简数采集器 (Keydatas) plugin for WordPress, affecting all versions up to and including 2.5.2.

Identified as CVE-2024-6220, this vulnerability allows unauthenticated arbitrary file uploads due to missing file type validation in the keydatas_downloadImages function.

AttributeDetails
Description简数采集器 (Keydatas) <= 2.5.2 – Unauthenticated Arbitrary File Upload
Affected Plugin简数采集器 (Keydatas)
Plugin Slugkeydatas
Affected Versions<= 2.5.2
CVE IDCVE-2024-6220
CVSS Score9.8 (Critical)
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
ResearcherFoxyyy
Fully Patched Version2.6.1
Bounty Award$488.00
Vulnerability DetailsThe vulnerability stems from missing file type validation in the keydatas_downloadImages function, allowing attackers to upload arbitrary files, including malicious PHP scripts, to the WordPress uploads directory. This directory is publicly accessible, enabling remote code execution.

Technical Analysis

The Keydatas plugin connects a WordPress site with the keydatas.com app, primarily used to manage WordPress posts. The plugin’s keydatas_post_doc() function includes a password check, but the default password is set to “keydatas.com”.


$kds_password = get_option('keydatas_password', "keydatas.com"
$post_password = keydatas_getPostValSafe('kds_password');
if (empty($post_password) || $post_password != $kds_password) {
    keydatas_failRsp(1403, "password error", "提交的发布密码错误");
}

If site owners do not change this default password, attackers can exploit the plugin’s functions, including the vulnerable keydatas_downloadImages() function.


$docImgsStr = keydatas_getPostValSafe("__kds_docImgs");
if (!empty($docImgsStr)) {
    $docImgs = explode(',',$docImgsStr);
    if (is_array($docImgs)) {
        $upload_dir = wp_upload_dir();
        foreach ($docImgs as $imgUrl) {
            $urlItemArr = explode('/',$imgUrl);
            $itemLen=count($urlItemArr);
            if($itemLen>=3){
                //
                $fileRelaPath=$urlItemArr[$itemLen-3].'/'.$urlItemArr[$itemLen-2];
                $imgName=$urlItemArr[$itemLen-1];
                $finalPath=$upload_dir['basedir'] . '/'.$fileRelaPath;
                if (wp_mkdir_p($finalPath)) {
                    $file = $finalPath . '/' . $imgName;
                    if(!file_exists($file)){
                        $doc_image_data = file_get_contents($imgUrl);
                        file_put_contents($file, $doc_image_data);
                    }
                }
            }
        }//.for
    }//..is_array
}

The function downloads files specified in the __kds_docImgs request parameter using file_get_contents() and uploads them to the WordPress uploads directory using file_put_contents().

The lack of file type or extension checks allows attackers to upload malicious PHP files, potentially compromising site sites.

Top Attacking IP Addresses

  • 103.233.8.166 (Hong Kong)
  • 103.233.8.0 (Hong Kong)
  • 163.172.77.82 (France)
  • 84.17.37.217 (Hong Kong)
  • 84.17.57.0 (Hong Kong)

Wordfence Premium, Care, and Response users received a firewall rule to protect against this vulnerability on June 20, 2024.

Free users received the same protection on July 20, 2024. The Keydatas team was contacted on June 20, 2024, but after no response, the issue was escalated to the WordPress.org Security Team, leading to the plugin’s closure on July 16, 2024.

A patch was released on July 29, 2024. Users are urged to update to the latest patched version, 2.6.1, immediately.

To safeguard against such exploits, plugins must be regularly updated, vulnerability scans conducted, and robust firewall protection employed.

The active exploitation of the CVE-2024-6220 vulnerability in the Keydatas plugin highlights the critical need for vigilance in maintaining website security.

By staying informed and proactive, website owners can protect their sites from malicious attacks and ensure a safer web environment for all.

Are you from SOC and DFIR Teams? – Analyse Malware Incidents & get live Access with ANY.RUN -> Free Access

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Latest articles

Ivanti Fully Patched Connect Secure RCE Vulnerability That Actively Exploited in the Wild

Ivanti has issued an urgent security advisory for CVE-2025-22457, a critical vulnerability impacting Ivanti...

Beware! Weaponized Job Recruitment Emails Spreading BeaverTail and Tropidoor Malware

A concerning malware campaign was disclosed by the AhnLab Security Intelligence Center (ASEC), revealing...

EncryptHub Ransomware Uncovered Through ChatGPT Use and OPSEC Failures

EncryptHub, a rapidly evolving cybercriminal entity, has come under intense scrutiny following revelations of...

PoisonSeed Targets CRM and Bulk Email Providers in New Supply Chain Phishing Attack

A sophisticated phishing campaign, dubbed "PoisonSeed," has been identified targeting customer relationship management (CRM)...

Supply Chain Attack Prevention

Free Webinar - Supply Chain Attack Prevention

Recent attacks like Polyfill[.]io show how compromised third-party components become backdoors for hackers. PCI DSS 4.0’s Requirement 6.4.3 mandates stricter browser script controls, while Requirement 12.8 focuses on securing third-party providers.

Join Vivekanand Gopalan (VP of Products – Indusface) and Phani Deepak Akella (VP of Marketing – Indusface) as they break down these compliance requirements and share strategies to protect your applications from supply chain attacks.

Discussion points

Meeting PCI DSS 4.0 mandates.
Blocking malicious components and unauthorized JavaScript execution.
PIdentifying attack surfaces from third-party dependencies.
Preventing man-in-the-browser attacks with proactive monitoring.

More like this

Ivanti Fully Patched Connect Secure RCE Vulnerability That Actively Exploited in the Wild

Ivanti has issued an urgent security advisory for CVE-2025-22457, a critical vulnerability impacting Ivanti...

Beware! Weaponized Job Recruitment Emails Spreading BeaverTail and Tropidoor Malware

A concerning malware campaign was disclosed by the AhnLab Security Intelligence Center (ASEC), revealing...

EncryptHub Ransomware Uncovered Through ChatGPT Use and OPSEC Failures

EncryptHub, a rapidly evolving cybercriminal entity, has come under intense scrutiny following revelations of...