A security vulnerability has been discovered in the Cloudflare WARP client, specifically with the warp-cli command "add-trusted-ssid." This vulnerability, designated as CVE-2022-3512, can be exploited to disconnect the WARP client and bypass the "Lock WARP switch" feature, which in turn, results in Zero Trust policies not being enforced on the affected endpoint.

In this post, we will delve into the details of the vulnerability, explain how it works, provide code snippets to illustrate the issue, and link to original references for a deeper understanding. By the end of this post, you will have a clear understanding of the CVE-2022-3512 vulnerability and its potential impact.

Exploit Details

First, let's discuss the background of the vulnerability. Cloudflare WARP is a service designed to provide a fast, encrypted connection between a user's device and the internet. In order to enforce security policies, the WARP client has a feature called "Lock WARP switch" that restricts users from disabling the WARP connection, thereby ensuring compliance with Zero Trust policies.

However, a flaw has been discovered in this feature, where an authenticated, local user can run the following warp-cli command:

warp-cli add-trusted-ssid "Your_SSID"

This command adds a trusted SSID (Wi-Fi network name) to the WARP configuration, and when the user connects to this SSID, the WARP client will disconnect, effectively bypassing the "Lock WARP switch" feature. This results in the affected endpoint being unprotected by Zero Trust policies.

Original References

This vulnerability was initially reported by a security researcher named Doeke Zanstra, who discovered the flaw while implementing Zero Trust policies using Cloudflare WARP. The official security advisory for this vulnerability can be found at the following link:

- Cloudflare Security Advisory: CVE-2022-3512

The researcher also published a detailed blog post explaining how they discovered the vulnerability and their interactions with Cloudflare for reporting the issue:

- UnWARP: Bypassing Zero Trust in Cloudflare WARP

Code Snippet

While reproducing the vulnerability, the researcher used a Python script to exploit the issue. The key portion of the script is as follows:

import subprocess

def add_trusted_ssid(ssid):
    cmd = "warp-cli add-trusted-ssid " + ssid
    process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
    output, error = process.communicate()
    if error:
        print("Error:", error)
        print("Successfully added trusted SSID")

ssid = "YOUR_SSID"

This script simply runs the "warp-cli add-trusted-ssid" command with a given SSID, allowing the user to bypass the "Lock WARP switch" functionality.

Mitigation and Recommendation

In response to the reported vulnerability, Cloudflare has released an updated version of the WARP client (version 2022.3.) that addresses this issue. It is strongly recommended that users of Cloudflare WARP client update to the latest version as soon as possible to mitigate the risk posed by CVE-2022-3512.


CVE-2022-3512 is an important security vulnerability that can result in Zero Trust policies not being enforced on an affected endpoint by bypassing the "Lock WARP switch" feature in Cloudflare WARP clients. It is essential for users to be aware of this issue and take appropriate actions, such as updating their client to the latest version, in order to ensure their networks remain secure and protected.


Published on: 10/28/2022 10:15:00 UTC
Last modified on: 11/01/2022 18:35:00 UTC