CVE DatabaseCVE-2022-42948
한국어 권고문 →
CVE-2022-429489.8/CRITICALCISA KEVCWE-116CWE-116

Cobalt Strike Remote Code Execution Vulnerability via Swing Component HTML Injection (CVE-2022-42948)

⚡ Jump to Patch
Affected Vendors
helpsystems, fortra
Affected Components
cobalt strike
Published Date
2023-03-24
CVSS v3.1
9.8
CRITICAL
EPSS (30d)
2.7%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Cobalt Strike version 4.7.1

Impact

Remote attackers can execute arbitrary code within the Cobalt Strike UI context by injecting crafted HTML payloads

Mitigation

Immediately upgrade to Cobalt Strike version 4.7.2 or later, and restrict access to the Teamserver

Affected Products & Version Scope

Cobalt Strike version 4.7.1

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

The recommended remediation is to upgrade to Cobalt Strike version 4.7.2 or later, where HTML rendering in Swing components has been properly mitigated. Run the official update utility to apply the patch.

bash
# Navigate to the Cobalt Strike directory and run the updater
cd /opt/cobaltstrike
./update

2. Temporary Workaround & Hardening Configuration

If an immediate upgrade is not feasible, restrict access to the Cobalt Strike Teamserver port (default: 50050) using firewall rules to ensure only trusted operator IPs can connect.

bash
# Restrict Teamserver port 50050 to a specific trusted operator IP
sudo iptables -A INPUT -p tcp -s 10.10.10.50 --dport 50050 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 50050 -j DROP

3. Log Audit & IoC Verification Commands

Use the following commands to verify the running Cobalt Strike version and inspect Teamserver logs for potential HTML injection attempts.

bash
# Extract and check the version from the Cobalt Strike JAR manifest
unzip -p /opt/cobaltstrike/cobaltstrike.jar META-INF/MANIFEST.MF | grep 'Version'

# Scan Teamserver logs for suspicious HTML tags or object injections
grep -riE '(<html|<object|<applet|<script)' /opt/cobaltstrike/logs/
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR
As this vulnerability is listed on the CISA KEV, all Cobalt Strike deployments must be upgraded to version 4.7.2 or later immediately.

Block Kernel Privilege Escalation & Ransomware Payloads Before You Can Reboot

Protect unpatched Windows, Linux, and macOS workloads against in-memory exploitation and lateral movement with autonomous EDR.

100% MITRE ATT&CK Detection · 1-Click Rollback

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2022-42948) exists in Cobalt Strike version 4.7.1 and stems from the default behavior of Java Swing components used in the client user interface (UI). Java Swing components (such as JLabel or JEditorPane) automatically interpret and render text as HTML if it begins with the '<html>' tag. Because the Cobalt Strike UI failed to properly sanitize and escape HTML tags from external inputs (such as beacon metadata, process lists, or usernames) before rendering them, an attacker can inject malicious HTML and Java code.

2. Exploitation Mechanics & Attack Scenario

An attacker can exploit this vulnerability by manipulating metadata sent from a compromised host or a rogue beacon to the Cobalt Strike Teamserver. For instance, by registering a beacon with a computer name containing malicious HTML tags (e.g., '<html><object classid=...>' or referencing a malicious Java class), the payload is stored on the Teamserver. When a security analyst or operator opens the Cobalt Strike UI and views the beacon details, the Swing component renders the injected HTML, triggering the execution of arbitrary Java code on the operator's local workstation.

3. Infrastructure & Business Impact

While Cobalt Strike is a widely used tool for penetration testing and red teaming, this vulnerability allows blue teams or hostile threat actors to counter-exploit the red team operators. Successful exploitation leads to full compromise of the operator's workstation, potentially exposing sensitive engagement data, client infrastructure access paths, and active credentials, resulting in severe operational and reputational damage.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2022-42948)

FAQ

Q1. How critical is CVE-2022-42948 and is it actively exploited in the wild?

CVE-2022-42948 is rated CVSS 9.8 (CRITICAL) with a 30-day EPSS exploitation probability of 2.7%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2022-42948?

Primary impacted vendors include helpsystems, fortra across cobalt strike. Scope summary: Cobalt Strike version 4.7.1

Q3. What temporary mitigations or workarounds exist for CVE-2022-42948 before patching?

[Mitigation] Immediately upgrade to Cobalt Strike version 4.7.2 or later, and restrict access to the Teamserver Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2022-42948

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (helpsystems)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2022-42948 Cobalt Strike Remote Code Execution Vulnerability via Swing Component HTML Injection (CVE-2022-42948) (CVSS 9.8) - Patch & Workaround | CVE Pulse