What is Cobalt Strike?
Cobalt Strike is a commercial adversary simulation and penetration testing platform used by red teams to simulate advanced threat actor tactics. It consists of a Teamserver (the C2 server that operators control) and Beacon (the implant agent deployed on target systems). Beacon calls home to the Teamserver, reporting in with connection metadata including a configurable username. The Teamserver's web-based operator UI displays this Beacon metadata — creating an attack surface where malicious Beacon check-in data can influence the operator's browser.
Overview
CVE-2022-39197 is a stored cross-site scripting (XSS) vulnerability (CWE-79) in the Cobalt Strike Teamserver. An attacker who has gained code execution on a victim system and deployed a Cobalt Strike Beacon (or who controls a rogue Beacon) can craft a malicious username in the Beacon configuration. When the Beacon calls home to the Teamserver, this username is displayed in the operator UI — and if it contains JavaScript, that script executes in the operator's browser. The attacker can use this to attack the Cobalt Strike operator themselves: stealing session cookies, pivoting to the operator's machine, or disrupting red team operations. Fortra issued an out-of-band patch (4.7.1) to address this.
Affected Versions
| Product | Vulnerable | Fixed |
|---|---|---|
| Cobalt Strike | ≤ 4.7 | 4.7.1 (out-of-band) |
Technical Details
Beacon agents periodically check in to the Teamserver and transmit metadata including the configured computer name and username. The Teamserver did not sanitize this metadata before rendering it in the operator UI (the Sessions tab and related views), creating a stored XSS condition:
- Attack path: Attacker deploys a rogue Beacon with a username containing a JavaScript payload → Beacon checks in to the Teamserver → Teamserver stores and displays the unsanitized username in the operator UI → JavaScript executes in the operator's browser session
- No authentication required: The attacker only needs the ability to connect to the Teamserver's listener port with a crafted Beacon check-in — no Teamserver credentials needed
- Impact: Full control over the operator's browser session, including cookie theft and session hijacking against the Teamserver itself
- Reverse-attack scenario: Blue teamers or defenders operating honeypot Beacons can potentially attack red team operators who interact with their systems using unpatched Cobalt Strike
Discovery
Reported by multiple security researchers examining the Cobalt Strike attack surface. The vulnerability was notable because it demonstrates the security implications of the Teamserver rendering attacker-controlled data in a web interface.
Exploitation Context
CISA added CVE-2022-39197 to KEV in March 2023, reflecting that threat actors — including groups who cracked or pirated Cobalt Strike — exploited this vulnerability. Rogue or modified Cobalt Strike deployments used by criminal actors could be targeted by defenders using this technique to compromise operator infrastructure. The practical exploitation context is dual-use: red teams using unpatched Cobalt Strike are themselves vulnerable to blue team or threat actor counterattacks via crafted Beacon responses.
Remediation
- Upgrade Cobalt Strike to version 4.7.1 or later immediately
- If immediate upgrade is not possible, restrict Teamserver UI access to trusted IPs via firewall rules
- Audit Cobalt Strike license use — pirated versions will not receive updates and remain permanently vulnerable
- Review Teamserver access logs for unexpected Beacon connections that could indicate attempted exploitation
- Implement network-level filtering on Teamserver listener ports to block unexpected source IPs
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2022-39197 |
| Vendor / Product | Fortra — Cobalt Strike |
| NVD Published | 2022-09-22 |
| NVD Last Modified | 2025-11-03 |
| CVSS 3.1 Score | 6.1 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| Severity | MEDIUM |
| CWE | CWE-79 find similar ↗ |
| CISA KEV Added | 2023-03-30 |
| CISA KEV Deadline | 2023-04-20 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2022-09-20 | Fortra releases Cobalt Strike 4.7.1 out-of-band to patch CVE-2022-39197 |
| 2022-09-22 | CVE published |
| 2023-03-30 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2023-04-20 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| Cobalt Strike Out-of-Band Update 4.7.1 — CVE-2022-39197 Fix | Vendor Advisory |
| NVD — CVE-2022-39197 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |