NextGen Mirth Connect Exploitation and Exfiltration
An intruder is exploiting SQL injection or XXE vulnerabilities in NextGen Mirth Connect to exfiltrate credentials or write malicious files from the service process, typically identifiable by rare API traffic and unusual file system activity.
Based on research by CISA 2026-09-20 8 steps · 3 queries T1041 T1133 T1190 T1566
Brief
Why this hunt matters
CISA recently published ICSMA-26-253-01 regarding several critical vulnerabilities in NextGen Healthcare Mirth Connect. These flaws, including SQL injection (CVE-2026-82583) and XXE, allow an authenticated user to move from basic API access to full system compromise. Because Mirth Connect handles sensitive patient data and health information exchange, an intruder with system-level access can exfiltrate credentials or disrupt healthcare workflows.
How the hunt flows
The first phase identifies the attack surface. The hunt queries software inventory to list every host running Mirth Connect versions 4.7.1 or earlier. This scoping step ensures the subsequent, more resource-intensive queries only run where the risk exists.
Once the scope is set, the hunt baselines management API traffic. It examines HTTP activity logs for the management endpoints, such as the channel and database APIs. By calculating the prevalence of source IPs across the estate, the hunt highlights requests from uncommon hosts that do not match the usual administrative subnets.
Finally, the hunt looks for the behavioral aftermath of exploitation. It monitors the Mirth service process, often running as java.exe or mcserver.exe, for any file write activity involving executables, scripts, or web shells. Successful SQL injection often results in the service process dropping these files to gain persistent access.
Blind spots
This hunt faces two primary limitations. First, standard HTTP surface logging rarely captures the POST bodies required to see the specific SQL or XML payloads. This means an analyst can see the traffic, but not the exploit itself, until the adversary acts on the host. Second, in environments with many Java-based services, file writes from a generic java.exe process can be noisy. The hunt relies on command-line inspection to maintain high fidelity.
Steps
-
Locate vulnerable Mirth Connect instances
Query · scopingFind hosts running Mirth Connect versions 4.7.1 or earlier to define the hunt scope.
reads hb_software_inventorysqlSELECT device_hostname, package_name, package_version, install_path FROM hb_software_inventory WHERE (LOWER(package_name) LIKE '%mirth%connect%' OR LOWER(package_name) LIKE '%nextgen%connect%') AND (package_version LIKE '4.7.1%' OR package_version LIKE '4.7.0%' OR package_version LIKE '4.6%' OR package_version LIKE '4.5%' OR package_version LIKE '4.4%' OR package_version LIKE '4.3%' OR package_version LIKE '4.2%' OR package_version LIKE '4.1%' OR package_version LIKE '4.0%' OR package_version LIKE '3.%' OR package_version LIKE '2.%' OR package_version LIKE '1.%')What a hit looks like. A list of hosts and versions. Silence suggests no vulnerable versions are currently installed.
-
Baseline Mirth management API traffic
Query · baselineIdentify uncommon source IPs accessing Mirth management endpoints, which may indicate unauthorized authenticated access.
reads hb_http_activitysqlSELECT src_endpoint_ip, COUNT(DISTINCT device_hostname) AS host_count, COUNT(*) AS request_count, MIN(time) AS first_seen FROM hb_http_activity WHERE (url_path LIKE '/api/channels%' OR url_path LIKE '/api/database%' OR url_path LIKE '/api/users%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY src_endpoint_ip HAVING host_count <= 2 ORDER BY host_count ASC, request_count DESCWhat a hit looks like. Source IPs that only target a single host. Normal administrative traffic usually originates from a consistent set of management subnets.
-
Find Mirth process file drops
Query · detection candidateSearch for the Mirth service process writing executable files or scripts, a high-confidence indicator of successful SQL injection exploitation.
reads hb_file_activitysqlSELECT device_hostname, process_name, process_cmd_line, file_path, activity_name, time FROM hb_file_activity WHERE (instr(',' || '{{mirth_processes}}' || ',', ',' || LOWER(process_name) || ',') > 0 OR process_cmd_line LIKE '%com.mirth.connect.server.Mirth%') AND activity_id IN (1, 3, 5) AND (LOWER(file_path) LIKE '%.exe' OR LOWER(file_path) LIKE '%.jsp' OR LOWER(file_path) LIKE '%.ps1' OR LOWER(file_path) LIKE '%.bat' OR LOWER(file_path) LIKE '%.sh' OR LOWER(file_path) LIKE '%\webapps\%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')What a hit looks like. The Mirth service writing new script or binary files. This process should rarely drop new executables outside of maintenance windows.
-
Evaluate exploitation evidence
Agent triageCorrelate vulnerable versions, rare API access, and unusual file writes to determine host compromise status.
-
Route based on verdict
DecisionDirect the hunt to either forensic remediation for compromised hosts or patching for vulnerable ones.
-
Forensic review and remediation
Analyst taskPerform manual review of suspicious files and ensure the Mirth instance is upgraded.
-
Hunt close-out
Analyst taskFinalize the hunt and record exposure levels.
Coverage
Scenario coverage
| Stage | Covered | How, or why not |
|---|---|---|
| Identification of Vulnerable Mirth Connect Instances T1190 |
Yes | mirth-inventory |
| Authenticated Access to Database Connector API T1133 |
Yes | rare-api-source-ips |
| SQL Injection and XXE Exploitation Traffic T1190 |
Not visible | HTTP surfaces do not typically capture the POST bodies required to see SQL injection or XXE payloads. |
| Arbitrary File Write and Data Exfiltration T1041 |
Yes | mirth-file-writes |
Blind spots
- Needs full HTTP POST body logging. The hunt can identify rare traffic but cannot see the exploit payload itself to confirm malicious intent before a file is written. It would answer What specific SQL or XML payloads were sent to the /api/ endpoints?.
- Needs accurate process_cmd_line context. In environments with many Java-based services, file writes from java.exe may be noisy; command-line inspection is required to maintain fidelity. It would answer Is the java.exe process definitively the Mirth Connect service?.
Parameters & data
Parameters
| Parameter | Type | Default | What it is |
|---|---|---|---|
lookback_days | number | 14 | Days of history to examine. |
mirth_processes | list[string] | mirth.exe, mcserver.exe, java.exe, java | Candidate process names for the Mirth Connect service. |
scope_hosts | list[host] | — | Specific hostnames found in the scoping step; leave empty to hunt across the entire estate. |
Telemetry
| Source | Category | Telemetry |
|---|---|---|
| Endpoint telemetry (hb_ surfaces) | endpoint | endpoint |
| Web server / proxy logs | siem | network |
Source
---
analysis: A static rule might alert on a version string, but this hunt pivots between
inventory, API traffic prevalence, and the behavioral aftermath of exploitation
(unusual file writes from the service process) to distinguish active compromise
from simple presence of the software.
blind_spots:
- id: incomplete-http-visibility
question: What specific SQL or XML payloads were sent to the /api/ endpoints?
requires: full HTTP POST body logging
risk: The hunt can identify rare traffic but cannot see the exploit payload itself
to confirm malicious intent before a file is written.
stage: exploit-web-activity
- id: generic-java-process
question: Is the java.exe process definitively the Mirth Connect service?
requires: accurate process_cmd_line context
risk: In environments with many Java-based services, file writes from java.exe may
be noisy; command-line inspection is required to maintain fidelity.
stage: post-exploit-impact
coverage:
- stage: vulnerability-exposure-identification
status: covered
steps:
- mirth-inventory
- stage: authenticated-api-access
status: covered
steps:
- rare-api-source-ips
- blind_spot: incomplete-http-visibility
reason: HTTP surfaces do not typically capture the POST bodies required to see SQL
injection or XXE payloads.
stage: exploit-web-activity
status: not_visible
- stage: post-exploit-impact
status: covered
steps:
- mirth-file-writes
guardrails:
claims: no_unsupported
evidence: citation_required
missing_data: not_benign
telemetry: untrusted
hunt:
applicability: campaign-specific
handoff: promote-to-detection
justification: Mirth Connect is critical infrastructure for healthcare data interchange;
the identified vulnerabilities allow authenticated users to move from management
API access to arbitrary code execution through file writes.
methodology: model-assisted
trigger: intel-report
hypothesis: An intruder is exploiting SQL injection or XXE vulnerabilities in NextGen
Mirth Connect to exfiltrate credentials or write malicious files from the service
process, typically identifiable by rare API traffic and unusual file system activity.
labels:
- hunt
- attack.t1190
- attack.t1041
- attack.t1133
- attack.t1566
name: NextGen Mirth Connect Exploitation and Exfiltration
parameters:
lookback_days:
default: '14'
description: Days of history to examine.
from:
kind: manual
observed: '2026-09-10'
ref: hunt-standard
type: number
mirth_processes:
default:
- mirth.exe
- mcserver.exe
- java.exe
- java
description: Candidate process names for the Mirth Connect service.
from:
kind: manual
observed: '2026-09-10'
ref: product-documentation
type: list[string]
scope_hosts:
default: []
description: Specific hostnames found in the scoping step; leave empty to hunt
across the entire estate.
from:
kind: manual
observed: '2026-09-10'
ref: analyst-defined
type: list[host]
provenance:
authors:
- name: Huntbase hunt generation
org: huntbase.io
generated:
by: huntbase-hunt-generation
from: https://www.cisa.gov/news-events/ics-medical-advisories/icsma-26-253-01
gates:
- dry-run
- lint
model: hb_google/gemini-3-flash-preview
rationale: Start by identifying all servers running Mirth Connect; narrow to those
with Internet exposure via hb_exposed_assets if the estate is large.
references:
- name: CISA Advisory (ICSMA-26-253-01)
url: https://www.cisa.gov/news-events/ics-medical-advisories/icsma-26-253-01
related:
- hunt: mirth-connect-pre-auth-rce-v4-4
reason: Previous CVEs such as CVE-2023-43208 involved pre-authentication RCE which
uses different management API paths.
relation: out-of-scope-alternative
scenario:
stages:
- name: Identification of Vulnerable Mirth Connect Instances
observables:
- Mirth Connect version <= 4.7.1
- Mirth Connect service exposure
- CVE-2026-82583
- CVE-2026-78224
- CVE-2026-82578
slug: vulnerability-exposure-identification
tactic: initial-access
techniques:
- T1190
- name: Authenticated Access to Database Connector API
observables:
- Authentication to Database Connector API
- Logins to Mirth Connect management interface
slug: authenticated-api-access
tactic: initial-access
techniques:
- T1133
- name: SQL Injection and XXE Exploitation Traffic
observables:
- Database Connector API requests containing SQL syntax
- XSLT Transformer Step configuration changes
- XML batch processing with XPath enabled
- HTTP POST requests with DOCTYPE or ENTITY tags
- Requests to /api/ (Mirth Connect API)
slug: exploit-web-activity
tactic: execution
techniques:
- T1190
- name: Arbitrary File Write and Data Exfiltration
observables:
- Mirth Connect process (java.exe/mirth.exe) writing files to unexpected paths
- Outbound network connections from Mirth Connect server to external IPs
- DNS queries for out-of-band XXE exfiltration
- Extraction of stored credentials from connected systems
slug: post-exploit-impact
tactic: exfiltration
techniques:
- T1041
summary: Attackers exploit SQL injection and XML External Entity (XXE) vulnerabilities
in NextGen Healthcare Mirth Connect (v4.7.1 and earlier) to gain unauthorized
access and exfiltrate data. Successful exploitation allows authenticated users
to execute arbitrary SQL via the Database Connector API or trigger XXE flaws in
XSLT and XML batch processing steps, leading to credential theft, arbitrary file
writes, and data exfiltration.
severity: high
targets:
analyst:
name: Tier-2 analyst
role: analyst
endpoint:
category: endpoint
name: Endpoint telemetry (hb_ surfaces)
telemetry:
- endpoint
hunter:
agent: true
name: Hunt agent
web:
category: siem
name: Web server / proxy logs
telemetry:
- network
tlp: clear
type: investigation
---
# NextGen Mirth Connect Exploitation and Exfiltration
NextGen Mirth Connect versions 4.7.1 and earlier are vulnerable to critical flaws including SQL injection (CVE-2026-82583) and XXE (CVE-2026-78224, CVE-2026-82578). These allow authenticated users to move from API access to full system compromise. This hunt identifies vulnerable instances, baselines the source IPs hitting management APIs, and searches for the behavioral aftermath of exploitation where the Mirth service process writes executable files or scripts to the host.
## mirth-inventory
<!-- Locate vulnerable Mirth Connect instances -->
Find hosts running Mirth Connect versions 4.7.1 or earlier to define the hunt scope.
```sqlite target=endpoint role=scoping
~~~yaml
expected: A list of hosts and versions. Silence suggests no vulnerable versions are
currently installed.
reads:
- device_hostname
- package_name
- package_version
- install_path
silence: not_evidence_of_absence
source: hb_software_inventory
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT device_hostname, package_name, package_version, install_path FROM hb_software_inventory WHERE (LOWER(package_name) LIKE '%mirth%connect%' OR LOWER(package_name) LIKE '%nextgen%connect%') AND (package_version LIKE '4.7.1%' OR package_version LIKE '4.7.0%' OR package_version LIKE '4.6%' OR package_version LIKE '4.5%' OR package_version LIKE '4.4%' OR package_version LIKE '4.3%' OR package_version LIKE '4.2%' OR package_version LIKE '4.1%' OR package_version LIKE '4.0%' OR package_version LIKE '3.%' OR package_version LIKE '2.%' OR package_version LIKE '1.%')
```
## rare-api-source-ips
<!-- Baseline Mirth management API traffic -->
Identify uncommon source IPs accessing Mirth management endpoints, which may indicate unauthorized authenticated access.
```sqlite target=web role=baseline params=(scope_hosts=scope_hosts, lookback_days=lookback_days)
~~~yaml
baseline:
compare: first_seen
window: '{{lookback_days}}d'
expected: Source IPs that only target a single host. Normal administrative traffic
usually originates from a consistent set of management subnets.
prevalence:
by: device_hostname
key:
- src_endpoint_ip
rare_below: 3
reads:
- src_endpoint_ip
- device_hostname
- url_path
- time
silence: not_evidence_of_absence
source: hb_http_activity
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT src_endpoint_ip, COUNT(DISTINCT device_hostname) AS host_count, COUNT(*) AS request_count, MIN(time) AS first_seen FROM hb_http_activity WHERE (url_path LIKE '/api/channels%' OR url_path LIKE '/api/database%' OR url_path LIKE '/api/users%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY src_endpoint_ip HAVING host_count <= 2 ORDER BY host_count ASC, request_count DESC
```
## mirth-file-writes
<!-- Find Mirth process file drops -->
Search for the Mirth service process writing executable files or scripts, a high-confidence indicator of successful SQL injection exploitation.
```sqlite target=endpoint role=detection-candidate params=(mirth_processes=mirth_processes, scope_hosts=scope_hosts, lookback_days=lookback_days)
~~~yaml
expected: The Mirth service writing new script or binary files. This process should
rarely drop new executables outside of maintenance windows.
reads:
- device_hostname
- process_name
- process_cmd_line
- file_path
- activity_name
- time
silence: evidence_of_absence
source: hb_file_activity
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT device_hostname, process_name, process_cmd_line, file_path, activity_name, time FROM hb_file_activity WHERE (instr(',' || '{{mirth_processes}}' || ',', ',' || LOWER(process_name) || ',') > 0 OR process_cmd_line LIKE '%com.mirth.connect.server.Mirth%') AND activity_id IN (1, 3, 5) AND (LOWER(file_path) LIKE '%.exe' OR LOWER(file_path) LIKE '%.jsp' OR LOWER(file_path) LIKE '%.ps1' OR LOWER(file_path) LIKE '%.bat' OR LOWER(file_path) LIKE '%.sh' OR LOWER(file_path) LIKE '%\webapps\%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```
## analyze-exposure
<!-- Evaluate exploitation evidence -->
```agent target=hunter
cite: required
context:
- mirth-inventory
- rare-api-source-ips
- mirth-file-writes
max_iterations: 3
objective: Determine if any host running Mirth Connect v4.7.1 or earlier shows signs
of active exploitation, focusing on the overlap between rare source IPs and suspicious
file writes.
success_criteria: A verdict of malicious, suspicious, or benign for each identified
Mirth host.
tools:
- endpoint
- web
```
## route-findings
<!-- Route based on verdict -->
if~: "the agent finds malicious or suspicious activity such as file writes or anomalous API access" (confidence: medium, judge=hunter)
then: → remediation-review
indeterminate: → remediation-review
unavailable: → remediation-review (blind_spot: incomplete-http-visibility)
else: → close-out
## remediation-review
<!-- Forensic review and remediation -->
```manual target=analyst
Collect and analyze any files identified in the behavioural step. Confirm all Mirth Connect instances are upgraded to v4.7.2 or later to mitigate the vulnerabilities.
```
→ close-out
## close-out
<!-- Hunt close-out -->
```manual target=analyst
Document the number of vulnerable versus patched hosts. Record any findings of unauthorized access to the Database Connector API for future tuning.
```
→ end
Run it
Take this hunt into your environment.
Open it in Huntbase to run every step against your own connections, with Scout weighing the evidence and your analysts in command. Or take the open hunt.md file anywhere that reads the format.
Machine-drafted by huntbase-hunt-generation using hb_google/gemini-3-flash-preview, gated by dry-run, lint, then reviewed by a person.