CVE DatabaseCVE-2022-39197
한국어 권고문 →
CVE-2022-391976.1/MEDIUMCISA KEVCWE-79CWE-79

Cobalt Strike Teamserver Remote Cross-Site Scripting (XSS) Vulnerability (CVE-2022-39197) Security Advisory

⚡ Jump to Patch
Affected Vendors
helpsystems, fortra
Affected Components
cobalt strike
Published Date
2022-09-22
CVSS v3.1
6.1
MEDIUM
EPSS (30d)
44.1%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

HelpSystems Cobalt Strike through version 4.7 (specifically affecting the Teamserver component)

Impact

A remote attacker can execute arbitrary HTML/JS code within the Cobalt Strike operator console by spoofing the username field in a beacon payload, potentially leading to session hijacking or information disclosure

Mitigation

Immediately upgrade Cobalt Strike to the official patched version 4.7.1 or higher

Affected Products & Version Scope

All Cobalt Strike versions up to and including 4.7

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

HelpSystems (now Fortra) released an out-of-band update (version 4.7.1) to address this vulnerability. Use the official update utility to upgrade your installation.

bash
# Navigate to the Cobalt Strike installation directory
cd /opt/cobaltstrike

# Run the update utility with your licensed key
./update

2. Temporary Workaround & Hardening Configuration

If immediate patching is not feasible, restrict access to the Teamserver port (default: 50050) and listener ports using host-based firewalls to ensure only authorized operators and known IP ranges can communicate with the server.

bash
# Set default incoming policy to deny
sudo ufw default deny incoming

# Allow access to the Teamserver port only from trusted administrator IPs
sudo ufw allow from 192.168.10.100 to any port 50050 proto tcp comment 'Restrict Teamserver Access'

# Enable firewall and verify rules
sudo ufw enable
sudo ufw status verbose

3. Log Audit & IoC Verification Commands

Verify the running version of Cobalt Strike and inspect the Teamserver logs for any anomalous beacon registration attempts containing HTML tags.

bash
# Check the running Cobalt Strike processes and arguments
ps -ef | grep -i cobaltstrike

# Scan Teamserver logs for potential XSS injection attempts in metadata fields
grep -riE '<html|<script|<img' /opt/cobaltstrike/logs/
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR
Due to active exploitation in the wild (CISA KEV), immediately upgrade all Cobalt Strike Teamservers to version 4.7.1 or later.

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-39197) is a Cross-Site Scripting (XSS) flaw in the Teamserver component of Cobalt Strike, a widely used penetration testing and threat emulation platform. The root cause lies in the insufficient input validation and sanitization of metadata received from Beacon payloads. When a Beacon registers with the Teamserver, its metadata (such as the username) is rendered in the Java Swing-based graphical user interface (GUI) of the Cobalt Strike client without proper HTML escaping, allowing embedded HTML tags to be executed.

2. Exploitation Mechanics & Attack Scenario

To exploit this vulnerability, an attacker first intercepts or reverse-engineers an existing Cobalt Strike Beacon payload to understand its communication structure. The attacker then crafts a malformed registration request where the username field contains malicious HTML or JavaScript payloads (e.g., <html><img src=x onerror=...>). When this crafted payload is sent to the target Teamserver, the server processes it and sends the metadata to all connected operator consoles. Once an operator views the active beacon list, the injected HTML code executes within their console context, which can be leveraged for client-side exploitation or remote code execution.

3. Infrastructure & Business Impact

Cobalt Strike is heavily utilized by both legitimate security professionals (Red Teams) and malicious threat actors (APT groups, ransomware operators). Because this vulnerability allows external actors to target the C2 (Command and Control) infrastructure itself, it has been actively exploited in the wild and is cataloged in CISA's Known Exploited Vulnerabilities (KEV). Successful exploitation can compromise the integrity of security assessments, allow blue teams to counter-exploit threat actor infrastructure, or expose sensitive penetration testing data to unauthorized parties.

Official Vendor Advisories & References

NVD Original English Description

An XSS (Cross Site Scripting) vulnerability was found in HelpSystems Cobalt Strike through 4.7 that allowed a remote attacker to execute HTML on the Cobalt Strike teamserver. To exploit the vulnerability, one must first inspect a Cobalt Strike payload, and then modify the username field in the payload (or create a new payload with the extracted information and then modify that username field to be malformed).

Frequently Asked SecOps Questions (CVE-2022-39197)

FAQ

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

CVE-2022-39197 is rated CVSS 6.1 (MEDIUM) with a 30-day EPSS exploitation probability of 44.1%. 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-39197?

Primary impacted vendors include helpsystems, fortra across cobalt strike. Scope summary: All Cobalt Strike versions up to and including 4.7

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

[Mitigation] Immediately upgrade Cobalt Strike to the official patched version 4.7.1 or higher 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-39197

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-39197 Cobalt Strike Teamserver Remote Cross-Site Scripting (XSS) Vulnerability (CVE-2022-39197) Security Advisory (CVSS 6.1) - Patch & Workaround | CVE Pulse