Cloudanix VulnDB

CVE-2020-8177

High · 7.8

CVSS

7.8

EPSS

1.3%

Published

Dec 14, 2020

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

An old flaw in a widely used file-download tool could let an attacker replace important files on a computer when a certain command option is used.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
Low Privilege
Complexity
Low
Impact
Data Tampering
Component
Library
Class
Path Traversal
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability allows improper filename handling in curl versions 7.20.0 to 7.70.0 that permits path traversal sequences when the -J remote filename flag is supplied, resulting in arbitrary local file overwrites.

Why it matters to the business

Successful exploitation can corrupt or replace critical configuration and data files on systems such as GitLab Bitnami deployments, causing service outages, data loss, or follow-on compromise; the issue has been public for over five years with available exploits but remains low in exploitation probability.

How an attack unfolds

An attacker supplies a crafted HTTP response containing a filename with directory traversal sequences such as ../../targetfile; the victim invokes curl with the -J flag against the malicious source and the tool writes the downloaded content directly to the traversed path, silently overwriting the target.

How to fix it

Upgrade GitLab Bitnami packages to version 14.4.5 or later, which bundles a fixed curl release after 7.70.0; avoid use of the -J flag on untrusted sources until patches are applied.

How to confirm the fix worked

Confirm the installed curl version is 7.71.0 or newer and that GitLab Bitnami reports version 14.4.5 or higher; test the -J flag against a controlled server returning a traversal filename and verify the file is not written outside the intended directory.

Typical attack path

  1. Locate a host running a vulnerable curl version bundled with affected software such as GitLab Bitnami
  2. Host or compromise a web server that returns a malicious Content-Disposition filename containing path traversal characters
  3. Trigger execution of curl -J against the malicious endpoint
  4. Observe silent overwrite of the chosen local file

How to detect it

Search process execution logs and command-line histories for curl invocations containing the -J flag; examine file-system audit logs for unexpected writes to sensitive paths initiated by curl processes.

What your security team should do

  • Immediately upgrade all GitLab Bitnami instances to 14.4.5 or newer
  • Inventory systems for curl versions between 7.20.0 and 7.70.0 and prioritize patching
  • Restrict or monitor use of curl -J in scripts and automation
  • Review file-integrity monitoring alerts for unexpected overwrites of configuration or credential files

The record

curl 7.20.0 through 7.70.0 is vulnerable to improper restriction of names for files and other resources that can lead too overwriting a local file when the -J flag is used.

Affected packages

Ecosystem Package Introduced Fixed
Alpine:v3.10 curl 0 7.66.0-r1
Alpine:v3.11 curl 0 7.67.0-r1
Alpine:v3.12 curl 0 7.69.1-r1
Alpine:v3.13 curl 0 7.71.0-r0
Alpine:v3.14 curl 0 7.71.0-r0
Alpine:v3.15 curl 0 7.71.0-r0
Alpine:v3.16 curl 0 7.71.0-r0
Alpine:v3.17 curl 0 7.71.0-r0
Alpine:v3.18 curl 0 7.71.0-r0
Alpine:v3.19 curl 0 7.71.0-r0
Alpine:v3.20 curl 0 7.71.0-r0
Alpine:v3.21 curl 0 7.71.0-r0
Alpine:v3.22 curl 0 7.71.0-r0
Alpine:v3.9 curl 0 7.64.0-r4
Debian:10 curl 0 7.64.0-4+deb10u2
Debian:11 curl 0 7.72.0-1
Debian:12 curl 0 7.72.0-1
Debian:13 curl 0 7.72.0-1
Debian:9 curl 0 7.52.1-5+deb9u11
Mageia:7 curl 0 7.71.0-1.mga7
Red Hat:enterprise_linux:7::client curl 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::client curl-debuginfo 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::client libcurl 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::client libcurl-devel 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::computenode curl 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::computenode curl-debuginfo 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::computenode libcurl 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::computenode libcurl-devel 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::server curl 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::server curl-debuginfo 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::server libcurl 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::server libcurl-devel 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::workstation curl 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::workstation curl-debuginfo 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::workstation libcurl 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:7::workstation libcurl-devel 0 0:7.29.0-59.el7_9.1
Red Hat:enterprise_linux:8::baseos curl 0 0:7.61.1-14.el8
Red Hat:enterprise_linux:8::baseos curl-debuginfo 0 0:7.61.1-14.el8
Red Hat:enterprise_linux:8::baseos curl-debugsource 0 0:7.61.1-14.el8
Red Hat:enterprise_linux:8::baseos curl-minimal-debuginfo 0 0:7.61.1-14.el8
Red Hat:enterprise_linux:8::baseos libcurl 0 0:7.61.1-14.el8
Red Hat:enterprise_linux:8::baseos libcurl-debuginfo 0 0:7.61.1-14.el8
Red Hat:enterprise_linux:8::baseos libcurl-devel 0 0:7.61.1-14.el8
Red Hat:enterprise_linux:8::baseos libcurl-minimal 0 0:7.61.1-14.el8
Red Hat:enterprise_linux:8::baseos libcurl-minimal-debuginfo 0 0:7.61.1-14.el8
Red Hat:rhel_eus:8.2::baseos curl 0 0:7.61.1-12.el8_2.2
Red Hat:rhel_eus:8.2::baseos curl-debuginfo 0 0:7.61.1-12.el8_2.2
Red Hat:rhel_eus:8.2::baseos curl-debugsource 0 0:7.61.1-12.el8_2.2
Red Hat:rhel_eus:8.2::baseos curl-minimal-debuginfo 0 0:7.61.1-12.el8_2.2
Red Hat:rhel_eus:8.2::baseos libcurl 0 0:7.61.1-12.el8_2.2
Red Hat:rhel_eus:8.2::baseos libcurl-debuginfo 0 0:7.61.1-12.el8_2.2
Red Hat:rhel_eus:8.2::baseos libcurl-devel 0 0:7.61.1-12.el8_2.2
Red Hat:rhel_eus:8.2::baseos libcurl-minimal 0 0:7.61.1-12.el8_2.2
Red Hat:rhel_eus:8.2::baseos libcurl-minimal-debuginfo 0 0:7.61.1-12.el8_2.2
SUSE:Enterprise Storage 5 curl 0 7.37.0-37.47.1
SUSE:HPE Helion OpenStack 8 curl 0 7.37.0-37.47.1
SUSE:Linux Enterprise High Performance Computing 15-ESPOS curl 0 7.60.0-3.29.1
SUSE:Linux Enterprise High Performance Computing 15-LTSS curl 0 7.60.0-3.29.1
SUSE:Linux Enterprise Module for Basesystem 15 SP1 curl 0 7.60.0-3.29.1
SUSE:Linux Enterprise Module for Basesystem 15 SP2 curl 0 7.66.0-4.3.1
SUSE:Linux Enterprise Point of Sale 11 SP3 curl 0 7.37.0-70.47.1
SUSE:Linux Enterprise Server 11 SP4-LTSS curl 0 7.37.0-70.47.1
SUSE:Linux Enterprise Server 11-SECURITY curl-openssl1 0 7.37.0-70.47.1
SUSE:Linux Enterprise Server 12 SP2-BCL curl 0 7.37.0-37.47.1
SUSE:Linux Enterprise Server 12 SP2-LTSS curl 0 7.37.0-37.47.1
SUSE:Linux Enterprise Server 12 SP3-BCL curl 0 7.37.0-37.47.1
SUSE:Linux Enterprise Server 12 SP3-LTSS curl 0 7.37.0-37.47.1
SUSE:Linux Enterprise Server 12 SP4 curl 0 7.60.0-4.15.2
SUSE:Linux Enterprise Server 12 SP5 curl 0 7.60.0-11.3.2
SUSE:Linux Enterprise Server 15-LTSS curl 0 7.60.0-3.29.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP2 curl 0 7.37.0-37.47.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 curl 0 7.37.0-37.47.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP4 curl 0 7.60.0-4.15.2
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 curl 0 7.60.0-11.3.2
SUSE:Linux Enterprise Server for SAP Applications 15 curl 0 7.60.0-3.29.1
SUSE:Linux Enterprise Software Development Kit 12 SP4 curl 0 7.60.0-4.15.2
SUSE:Linux Enterprise Software Development Kit 12 SP5 curl 0 7.60.0-11.3.2
SUSE:OpenStack Cloud 7 curl 0 7.37.0-37.47.1
SUSE:OpenStack Cloud 8 curl 0 7.37.0-37.47.1
SUSE:OpenStack Cloud Crowbar 8 curl 0 7.37.0-37.47.1
Ubuntu:16.04:LTS curl 0 7.47.0-1ubuntu2.15
Ubuntu:18.04:LTS curl 0 7.58.0-2ubuntu3.9
Ubuntu:20.04:LTS curl 0 7.68.0-1ubuntu2.1
Ubuntu:Pro:14.04:LTS curl 0 7.35.0-1ubuntu2.20+esm4
openSUSE:Leap 15.1 curl 0 7.60.0-lp151.5.12.1
openSUSE:Leap 15.1 curl-mini 0 7.60.0-lp151.5.12.1
openSUSE:Leap 15.2 curl 0 7.66.0-lp152.3.3.1
openSUSE:Leap 15.2 curl-mini 0 7.66.0-lp152.3.3.1

Related vulnerabilities