Vulnerability · Published Dec 21, 2020 · Assigned by GitHub_M

CVE-2020-26284Hugo can execute a binary from the current directory on Windows

High 7.7

In plain English

A high-severity OS command injection in hugo from gohugoio. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 74% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.7High
Exploit odds (30 days)1.5%top 26.2% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

Hugo is a fast and Flexible Static Site Generator built in Go. Hugo depends on Go's `os/exec` for certain features, e.g. for rendering of Pandoc documents if these binaries are found in the system `%PATH%` on Windows. In Hugo before version 0.79.1, if a malicious file with the same name (`exe` or `bat`) is found in the current working directory at the time of running `hugo`, the malicious command will be invoked instead of the system one. Windows users who run `hugo` inside untrusted Hugo sites are affected. Users should upgrade to Hugo v0.79.1. Other than avoiding untrusted Hugo sites, there is no workaround.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12hugo0.79.1-1DEBIAN-CVE-2020-26284
Debian:13hugo0.79.1-1DEBIAN-CVE-2020-26284
Debian:14hugo0.79.1-1DEBIAN-CVE-2020-26284
Gogithub.com/gohugoio/hugo0.79.1GHSA-8j34-9876-pvfq

Affected products (as reported)

VendorProductVersions
gohugoio hugo < 0.79.1

Weakness: CWE-78 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N

References