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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | hugo | 0.79.1-1 | DEBIAN-CVE-2020-26284 |
| Debian:13 | hugo | 0.79.1-1 | DEBIAN-CVE-2020-26284 |
| Debian:14 | hugo | 0.79.1-1 | DEBIAN-CVE-2020-26284 |
| Go | github.com/gohugoio/hugo | 0.79.1 | GHSA-8j34-9876-pvfq |
Affected products (as reported)
Weakness: CWE-78 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N
References
- https://github.com/gohugoio/hugo/security/advisories/GHSA-8j34-9876-pvfq x_refsource_CONFIRM
- https://github.com/golang/go/issues/38736 x_refsource_MISC