# CVE-2023-1314: Local Privilege Escalation Vulnerability in cloudflared's Installer

> Local attackers can escalate privileges by exploiting a world-writable directory in the Windows installer to delete or replace system files.

- **Severity:** High 7.5 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Mar 2023
- **Updated:** 26 Feb 2025
- **Also known as:** GHSA-7mjv-x3jf-545x, GO-2023-1652

## What is CVE-2023-1314?

CVE-2023-1314 is a high-severity vulnerability in cloudflared, published on 21 Mar 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A vulnerability has been discovered in cloudflared's installer (<= 2023.3.0) for Windows 32-bits devices that allows a local attacker with no administrative permissions to escalate their privileges on the affected device. This vulnerability exists because the MSI installer used by cloudflared relied on a world-writable directory.

An attacker with local access to the device (without Administrator rights) can use symbolic links to trick the MSI installer into deleting files in locations that the attacker would otherwise have no access to. By creating a symlink from the world-writable directory to the target file, the attacker can manipulate the MSI installer's repair functionality to delete the target file during the repair process.

Exploitation of this vulnerability could allow an attacker to delete important system files or replace them with malicious files, potentially leading to the affected device being compromised.

The cloudflared client itself is not affected by this vulnerability, only the installer for 32-bit Windows devices.

Weakness: CWE-59 (Improper Link Resolution Before File Access)

## Which versions are affected by CVE-2023-1314?

3 open source packages ship an affected version, including github.com/cloudflare/cloudflared. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cloudflare/cloudflared` | Go | All versions | 0.0.0-20230313153246-f686da832f85 |
| `github.com/cloudflare/cloudflared` | Go | All versions | 0.0.0-20230313153246-f686da832f85 |
| `github.com/cloudflare/cloudflared` | Go | All versions | 0.0.0-20230313153246-f686da832f85 |

Products: Cloudflare Cloudflared.

## How do I fix CVE-2023-1314?

Upgrade github.com/cloudflare/cloudflared to 0.0.0-20230313153246-f686da832f85 or later.

## Is CVE-2023-1314 being exploited?

There is no known exploitation of CVE-2023-1314 in the wild and no public exploit code.

## Other vulnerabilities in cloudflared

- [CVE-2020-24356](https://insights.sbomify.com/CVE-2020-24356/): Local Privilege Escalation in cloudflared (medium 6.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-1314 and fix it if it is affected.

What it is: CVE-2023-1314 is a high-severity vulnerability in cloudflared, published on 21 Mar 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-1314 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cloudflare/cloudflared (Go): affected all versions; fixed in 0.0.0-20230313153246-f686da832f85
- github.com/cloudflare/cloudflared (Go): affected all versions; fixed in 0.0.0-20230313153246-f686da832f85
- github.com/cloudflare/cloudflared (Go): affected all versions; fixed in 0.0.0-20230313153246-f686da832f85

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-1314/ (Markdown: https://insights.sbomify.com/CVE-2023-1314/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-1314
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-1314
- OSV: https://osv.dev/vulnerability/CVE-2023-1314

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-1314/
Summaries are generated and may contain mistakes; the official description above is the record.
