CVE-2020-24356: Github.com/cloudflare/cloudflared Local Privilege Escalation Vulnerability
HIGHCVE-2020-24356 is a HIGH (CVSS 7.8) local privilege escalation vulnerability (CWE-427: Uncontrolled Search Path Element) affecting Github.com/cloudflare/cloudflared libraries in the Go ecosystem. The issue involves local privilege escalation in cloudflared. Remediation is available by upgrading affected packages to version 0.0.0-20200820025921-9323844ea773.
CVE-2020-24356 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-24356
To remediate this vulnerability, upgrade all affected Github.com/cloudflare/cloudflared dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/cloudflare/cloudflared to 0.0.0-20200820025921-9323844ea773
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/cloudflare/cloudflared
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-24356, inspect your project dependencies for Github.com/cloudflare/cloudflared:
inspect dependencies for github.com/cloudflare/cloudflared
Analyze the terminal output to locate any version of Github.com/cloudflare/cloudflared in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20200820025921-9323844ea773), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-427: Uncontrolled Search Path Element, where the product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors. In Github.com/cloudflare/cloudflared, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-24356 Affected Github.com/cloudflare/cloudflared Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/cloudflare/cloudflared
|
Go |
< 0.0.0-20200820025921-9323844ea773
|
0.0.0-20200820025921-9323844ea773
|
References
Frequently Asked Questions
What is CVE-2020-24356?
Which Github.com/cloudflare/cloudflared versions are affected?
What version fixes CVE-2020-24356?
Is github.com/cloudflare/cloudflared affected?
What is the CVSS score of CVE-2020-24356?
What CWE is associated with CVE-2020-24356?
How can I check Go dependencies for CVE-2020-24356?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hgwp-4vp4-qmm2",
"modified" : "2023-03-02T21:10:45Z",
"published" : "2021-05-24T16:56:35Z",
"aliases" : [ "CVE-2020-24356" ],
"summary" : "Local Privilege Escalation in cloudflared",
"details" : "In `cloudflared` versions < 2020.8.1 (corresponding to 0.0.0-20200820025921-9323844ea773 on pkg.go.dev) on Windows, if an administrator has started `cloudflared` and set it to read configuration files from a certain directory, an unprivileged user can exploit a misconfiguration in order to escalate privileges and execute system-level commands. The misconfiguration was due to the way that `cloudflared` reads its configuration file. One of the locations that `cloudflared` reads from (C:\\etc\\) is not a secure by default directory due to the fact that Windows does not enforce access controls on this directory without further controls applied. A malformed config.yaml file can be written by any user. Upon reading this config, `cloudflared` would output an error message to a log file defined in the malformed config. The user-controlled log file location could be set to a specific location that Windows will execute when any user logs in.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cloudflare/cloudflared"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20200820025921-9323844ea773"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cloudflare/cloudflared/security/advisories/GHSA-hgwp-4vp4-qmm2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-24356"
}, {
"type" : "WEB",
"url" : "https://github.com/cloudflare/cloudflared/commit/9323844ea773b1444460fa09295ab8c01a88d97e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cloudflare/cloudflared"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-427" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-24T16:52:03Z",
"nvd_published_at" : "2020-10-02T15:15:00Z"
}
}