CVE-2020-26284: Github.com/gohugoio/hugo Hugo Can Execute A Binary Vulnerability
HIGHCVE-2020-26284 is a HIGH (CVSS 7.7) hugo can execute a binary vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Github.com/gohugoio/hugo libraries in the Go ecosystem. The issue involves hugo can execute a binary from the current directory on windows. Remediation is available by upgrading affected packages to version 0.79.1.
CVE-2020-26284 at a Glance
Security Impact
CVSS: 7.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N).
How to Fix CVE-2020-26284
To remediate this vulnerability, upgrade all affected Github.com/gohugoio/hugo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/gohugoio/hugo to 0.79.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/gohugoio/hugo
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-26284, inspect your project dependencies for Github.com/gohugoio/hugo:
inspect dependencies for github.com/gohugoio/hugo
Analyze the terminal output to locate any version of Github.com/gohugoio/hugo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.79.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Github.com/gohugoio/hugo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-26284 Affected Github.com/gohugoio/hugo Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/gohugoio/hugo
|
Go |
< 0.79.1
|
0.79.1
|
References
Frequently Asked Questions
What is CVE-2020-26284?
Which Github.com/gohugoio/hugo versions are affected?
What version fixes CVE-2020-26284?
Is github.com/gohugoio/hugo affected?
What is the CVSS score of CVE-2020-26284?
What CWE is associated with CVE-2020-26284?
How can I check Go dependencies for CVE-2020-26284?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8j34-9876-pvfq",
"modified" : "2021-05-21T18:15:45Z",
"published" : "2021-06-23T17:28:26Z",
"aliases" : [ "CVE-2020-26284" ],
"summary" : "Hugo can execute a binary from the current directory on Windows",
"details" : "## Impact\n\nHugo 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`) is found in the current working directory at the time of running `hugo`, the malicious command will be invoked instead of the system one.\n\nWindows users who run `hugo` inside untrusted Hugo sites are affected.\n\n## Patches\nUsers should upgrade to Hugo v0.79.1.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/gohugoio/hugo"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.79.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gohugoio/hugo/security/advisories/GHSA-8j34-9876-pvfq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26284"
}, {
"type" : "WEB",
"url" : "https://github.com/golang/go/issues/38736"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-21T18:15:45Z",
"nvd_published_at" : "2020-12-21T23:15:00Z"
}
}