VYPR
High severityNVD Advisory· Published Dec 21, 2020· Updated Aug 4, 2024

Hugo can execute a binary from the current directory on Windows

CVE-2020-26284

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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Hugo on Windows before 0.79.1 may execute a malicious binary from the current directory when resolving external commands, allowing code execution in untrusted Hugo sites.

Root

Cause

Hugo uses Go's os/exec package to invoke external programs like Pandoc. On Windows, Go's LookPath function searches the current working directory before checking the system PATH environment variable [2]. This behavior allows a malicious executable or batch file placed in the same directory as the Hugo project to be executed instead of the system command [1].

Exploitation

An attacker can create a malicious file with the same name as a tool Hugo relies on (e.g., pandoc.exe) and place it in the root of a Hugo site. When a user runs hugo in that directory, the malicious file is executed with the user's privileges [3]. No authentication is required, and the attack is local to the user's machine.

Impact

Successful exploitation leads to arbitrary command execution on the affected Windows system. The attacker gains the same rights as the logged-in user, potentially leading to data theft, malware installation, or further compromise [1].

Mitigation

Users should upgrade to Hugo v0.79.1, which addresses this issue by using an updated os/exec that avoids the current directory lookup [3]. There is no workaround other than avoiding untrusted Hugo sites.

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/gohugoio/hugoGo
< 0.79.10.79.1

Affected products

4

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

4

News mentions

0

No linked articles in our index yet.