ZeroHour
Security Affairspublished ()ingested @securityaffairs

APT28 hacked Roundcube email servers of Ukrainian entities

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2020-12641
Command Injection RCE in Roundcube Webmail (CVE-2020-12641)

Roundcube Webmail versions before 1.4.4 contain an OS command injection flaw (CWE-78) in rcube_image.php: shell metacharacters in the im_convert_path or im_identify_path configuration settings are not escaped before the configured ImageMagick binaries are executed. When image processing is triggered, an attacker who can control those configuration values can append arbitrary shell commands that run with the privileges of the web server user, yielding full remote code execution on the mail server. Successful exploitation can expose stored email, mail credentials, and the underlying host; the flaw is scored 9.8 (critical), with no privileges or user interaction required per the CVSS vector. Any self-hosted Roundcube deployment older than 1.4.4 is affected, including Roundcube packages shipped by openSUSE Leap and openSUSE Backports for SUSE Linux Enterprise. Exploitation is confirmed in the wild: CISA added it to the KEV catalog on 2023-06-22, EPSS puts the 30-day exploitation probability at ~84%, and headlines note APT28-linked activity targeting government Roundcube servers, including Ukrainian entities.

Do: Upgrade Roundcube to 1.4.4 or later, or apply the vendor-patched openSUSE Leap / SLE backport packages, as required by the CISA KEV listing (added 2023-06-22). After patching, verify that im_convert_path and im_identify_path settings contain no unescaped metacharacters and review web server logs for injected command activity; given APT28's targeting of government Roundcube servers, prioritize public-sector mail infrastructure for patching and threat hunting.

9.884% KEV PoC
  • roundcube webmail all versions before 1.4.4
  • opensuse leap packages shipping Roundcube before 1.4.4 (fixed via openSUSE updates)
  • opensuse backports sle packages shipping Roundcube before 1.4.4 (fixed via openSUSE updates)
masstens of thousands of internet-exposed Roundcube instances; millions of end users via bundled/self-hosted deployments (estimate)
CVE-2020-35730
Cross-Site Scripting in Roundcube Webmail Plain-Text Email Link Handling

Roundcube Webmail contains a cross-site scripting (XSS) flaw (CWE-79) in the link-reference handling of rcube_string_replacer.php, where the linkref_addindex function mishandles JavaScript embedded in a link element of a plain-text email. An attacker triggers the flaw simply by sending a crafted plain-text message to a victim; when the message is processed/displayed in the Roundcube interface, the embedded script executes in the context of the victim's webmail session. Successful exploitation can lead to session hijacking, theft of webmail cookies or credentials, and arbitrary actions in the victim's mailbox. Any deployment of Roundcube Webmail is affected, which includes self-hosted instances and webmail offered by hosting providers, ISPs, and universities. Although no public proof-of-concept is known, CISA added this vulnerability to the Known Exploited Vulnerabilities catalog on 2023-06-22, confirming exploitation in the wild; ransomware association is unknown, and no CVSS score is yet available, though EPSS puts 30-day exploitation probability at 32.7% (98th percentile).

Do: Apply the vendor's updated Roundcube release per CISA's required action (updates per vendor instructions); since no specific fixed versions appear in this data, install the latest patched release of your deployed 1.x branch and verify with the vendor advisory. Check webmail servers for processing of plain-text messages with link-reference elements and review logs for anomalous webmail sessions; treat KEV-listed status as evidence of active exploitation and prioritize internet-exposed Roundcube instances.

6.133% KEV
  • Roundcube Webmail
masslikely >1M users across tens of thousands of exposed instances (Roundcube is bundled as webmail in cPanel/Plesk and by many ISPs)
CVE-2021-44026
SQL Injection in Roundcube Webmail via Search Parameters

Roundcube Webmail contains a SQL injection flaw (CWE-89) in which attacker-controlled 'search' or 'search_params' input is incorporated into database queries without sufficient sanitization. An attacker with access to the webmail search functionality (typically an authenticated mailbox user) can submit crafted parameters to execute arbitrary SQL against the Roundcube backend database, potentially reading or modifying stored mail account data. Any organization running Roundcube is affected, including self-hosted mail servers and customers of hosting providers that ship Roundcube as their bundled webmail client. The flaw was added to CISA's Known Exploited Vulnerabilities catalog on 2023-06-22, indicating exploitation in the wild, and EPSS assigns a 41.9% probability of exploitation within 30 days (99th percentile). No public proof-of-concept is known, and CISA lists ransomware use as unknown.

Do: Apply vendor updates per Roundcube's instructions by upgrading to the latest patched, supported release, prioritizing internet-facing webmail servers; federal agencies must remediate per the CISA KEV requirement. If Roundcube is managed by a hosting provider (e.g., via cPanel), coordinate patching with them. In the interim, restrict webmail exposure and review database and web logs for anomalous search-related queries that may indicate exploitation.

9.842% KEV
  • Roundcube Webmail
massmillions of users across tens of thousands of exposed Roundcube deployments (estimated)
CVE-2023-23397
Zero-Click Elevation of Privilege in Microsoft Outlook (Forced NTLM Credential Leak)

CVE-2023-23397 is an elevation of privilege vulnerability in Microsoft Outlook caused by improper input validation (CWE-20) combined with authentication bypass via spoofed authentication data on the channel (CWE-294), allowing an attacker to force Outlook to authenticate to an attacker-controlled SMB/WebDAV server. It is triggered when Outlook processes a crafted email or calendar object — for example a meeting or task reminder whose sound property points to an attacker-supplied UNC path — and requires no user interaction. That authentication exchange leaks the victim's NTLM credential hash, which the attacker can crack offline or relay to authenticate as the victim and access resources such as Exchange mailboxes, effectively escalating privileges. Affected software spans Microsoft 365 Apps, Microsoft Office (including the Long Term Servicing Channel), and Microsoft Outlook, which are deployed across enterprises, governments, and militaries worldwide. It is actively exploited in the wild — added to CISA's Known Exploited Vulnerabilities catalog on 2023-03-14 with a 97.4% EPSS — and Microsoft has warned of exploitation by Russia-aligned threat actors in campaigns against government and military mail servers, with patches shipped in Microsoft's March 2023 security updates.

Do: Apply Microsoft's March 2023 security updates to Microsoft 365 Apps, Office/LTSC, and Outlook immediately, per CISA's required action. As interim mitigation, enable Extended Protection for Authentication or add accounts to the Protected Users group to block the NTLM credential leak, and audit calendar and task reminder sound properties for UNC paths (Microsoft published an audit/cleanup script for this) while watching for unexpected outbound SMB/WebDAV connections from hosts running Outlook.

9.897% KEV
  • Microsoft 365 Apps Affected builds as covered by Microsoft's March 2023 security updates; see Microsoft advisory for exact build ranges
  • Microsoft Office Affected builds as covered by Microsoft's March 2023 security updates; see Microsoft advisory for exact build ranges
  • Microsoft Office Long Term Servicing Channel (LTSC) Affected builds as covered by Microsoft's March 2023 security updates; see Microsoft advisory for exact build ranges
  • +1 more
masson the order of hundreds of millions of users (Outlook ships with Microsoft Office/Microsoft 365, the dominant enterprise and government email suite)

Indicators of compromiseAll →

TypeIndicatorContext
domainmeta.uaered, received on 12.05.2023 from the address “ukraine_news@meta[.]ua”, which contained bait content in the form of an article
Full article522 words · extracted from securityaffairs.com · click to collapse

Russia-linked APT28 group hacked into Roundcube email servers belonging to multiple Ukrainian organizations.

A joint investigation conducted by Ukraine’s Computer Emergency Response Team (CERT-UA) and Recorded Future revealed that the Russia-linked APT28 group hacked into Roundcube email servers belonging to multiple Ukrainian organizations.

The APT28 group (aka Fancy BearPawn StormSofacy GroupSednit, BlueDelta, and STRONTIUM) has been active since at least 2007 and it has targeted governments, militaries, and security organizations worldwide. The group was involved also in the string of attacks that targeted 2016 Presidential election.

The group operates out of military unity 26165 of the Russian General Staff Main Intelligence Directorate (GRU) 85th Main Special Service Center (GTsSS).

Most of the APT28s’ campaigns leveraged spear-phishing and malware-based attacks.

In the recent campaign, the threat actors used news about the ongoing conflict between Russia and Ukraine as bait. The cyber spies sent crafted emails to the target organizations, upon opening the messages Roundcube Webmail vulnerabilities (CVE-2020-35730CVE-2020-12641, and CVE-2021-44026) were triggered allowing them to hack vulnerable servers.

“during the investigation of the contents of the mailbox of the computer user, an e-mail with the subject “News of Ukraine” was discovered, received on 12.05.2023 from the address “ukraine_news@meta[.]ua”, which contained bait content in the form of an article from the publication “NV” (nv.ua), as well as an exploit for the vulnerability in Roundcube CVE-2020-35730 (XSS) and the corresponding JavaScript code designed to load and run additional JavaScript files: “q.js” and “e.js”.” reads the report published by CERT-UA. “Among the mentioned files, “e.js” provides the creation of a “default filter” filter for redirecting incoming e-mails to a third-party e-mail address, and also performs exfiltration using HTTP POST requests: address book, session values ​​(Cookie) and victim’s e-mail messages.”

APT28 Ukraine
BlueDelta Outlook and Roundcube spearphishing infection chain overlap (source Iksikt)

The state-sponsored hackers were able to deploy scripts to redirect the incoming emails to an email address under their control and steal Roundcube data by exploiting an SQLi issue tracked as CVE-2021-44026.

One of the scripts, the “c.js”, was containing an exploit for the CVE-2020-12641 vulnerability.

According to CERT-UA, this campaign targeted more than 40 Ukrainian organizations, including government entities.

The Recorded Future’s Insikt Group believes that the campaign has been active since November 2021. 

“Based on the targeting and geopolitical backdrop and the group’s organizational links, the highlighted BlueDelta activity was likely intended to enable military intelligence-gathering to support Russia’s invasion of Ukraine. Infrastructure related to BlueDelta activity has likely been operational since at least November 2021.” states Recorded Future. “This infrastructure was identified by Insikt Group via Recorded Future® Malicious Traffic Analysis (MTA) which surfaced multiple Ukrainian entities, including government institutions, communicating with this BlueDelta infrastructure. Organizations within Ukraine are likely the primary targets of this activity.”

According to Recorded Future researchers, this campaign overlaps with previous APT28 attacks exploiting Microsoft Outlook zero-day tracked as CVE-2023-23397 and aimed at European organizations.

Both reports from CERT-UA and Insikt includes Indicators of Compromise (IoCs) for this campaign.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, APT28)



Text extracted automatically; images, tables and formatting may be missing. Original: https://securityaffairs.com/147681/apt/apt28-hacked-roundcube-ukraine.html