hugo

Fork of github.com/gohugoio/hugo with reverse pagination support

git clone git://git.shimmy1996.com/hugo.git

index.md (1087B)

    1 
    2 ---
    3 date: 2020-12-19
    4 title: "Hugo 0.79.1: One Security Patch for Hugo on Windows"
    5 description: "Disallow running of e.g. Pandoc in the current directory."
    6 categories: ["Releases"]
    7 images:
    8 - images/blog/hugo-bug-poster.png
    9 
   10 ---
   11 
   12 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. However, if a malicious file with the same name (`exe` or `bat`) was found in the current working directory at the time of running `hugo`, the malicious command would be invoked instead of the system one.
   13 
   14 Windows users who ran `hugo` inside untrusted Hugo sites were affected.
   15 
   16 The origin of this issue comes from Go, see https://github.com/golang/go/issues/38736
   17 
   18 We have fixed this in Hugo by [using](https://github.com/gohugoio/hugo/commit/4a8267d64a40564aced0695bca05249da17b0eab) a patched version of `exec.LookPath` from https://github.com/cli/safeexec (thanks to [@mislav](https://github.com/mislav) for the implementation).
   19 
   20 Thanks to [@Ry0taK](https://github.com/Ry0taK) for the bug report.
   21 
   22