CVE-2016-5397: Github.com/apache/thrift Apache Thrift Go Library Command Vulnerability
HIGHCVE-2016-5397 is a HIGH (CVSS 8.8) apache thrift go library command vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Github.com/apache/thrift libraries in the Go ecosystem. The issue involves apache thrift go library command injection. Remediation is available by upgrading affected packages to version 0.10.0.
CVE-2016-5397 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2016-5397
To remediate this vulnerability, upgrade all affected Github.com/apache/thrift 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/apache/thrift to 0.10.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/apache/thrift
How to Check if You Are Affected
To determine whether your application is affected by CVE-2016-5397, inspect your project dependencies for Github.com/apache/thrift:
inspect dependencies for github.com/apache/thrift
Analyze the terminal output to locate any version of Github.com/apache/thrift in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.0), 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-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Github.com/apache/thrift, 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-2016-5397 Affected Github.com/apache/thrift Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/apache/thrift
|
Go |
< 0.10.0
|
0.10.0
|
References
Frequently Asked Questions
What is CVE-2016-5397?
Which Github.com/apache/thrift versions are affected?
What version fixes CVE-2016-5397?
Is github.com/apache/thrift affected?
What is the CVSS score of CVE-2016-5397?
What CWE is associated with CVE-2016-5397?
How can I check Go dependencies for CVE-2016-5397?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r4m4-pmvw-m6j5",
"modified" : "2023-07-31T18:21:59Z",
"published" : "2022-05-13T01:25:56Z",
"aliases" : [ "CVE-2016-5397" ],
"summary" : "Apache Thrift Go Library Command Injection",
"details" : "The Apache Thrift Go client library exposed the potential during code generation for command injection due to using an external formatting tool. Affected Apache Thrift 0.9.3 and older, Fixed in Apache Thrift 0.10.0.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/apache/thrift"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.10.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.9.3"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-5397"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2669"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2019:3140"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/THRIFT-3893"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r4d3f1d3e333d9c2b2f6e6ae8ed8750d4de03410ac294bcd12c7eefa3@%3Ccommits.cassandra.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20210124141102/http://www.securityfocus.com/bid/103025"
}, {
"type" : "WEB",
"url" : "http://mail-archives.apache.org/mod_mbox/thrift-user/201701.mbox/raw/%3CCANyrgvc3W%3DMJ9S-hMZecPNzxkyfgNmuSgVfW2hdDSz5ke%2BOPhQ%40mail.gmail.com%3E"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-31T18:21:59Z",
"nvd_published_at" : "2018-02-12T17:29:00Z"
}
}