CVE-2016-5397: Command Injection

Published Feb 12, 2018
·
Updated

Improper validation of the filepath argument in tgogenerator.cc:formatgooutput() of the Apache Thrift Go client library can allow an attacker to execute arbitrary commands.

The filepath parameter is derived from the service name. If an attacker can provide a service name to a framework invoking Thrift, the attacker could craft the name in a way leading to arbitrary commands being executed.

This affects versions before Apache Thrift 0.10.0.

Upstream Advisory:

http://mail-archives.apache.org/modmbox/thrift-user/201701.mbox/%3CCANyrgvc3W%3DMJ9S-hMZecPNzxkyfgNmuSgVfW2hdDSz5ke%2BOPhQ%40mail.gmail.com%3E

Upstream Issue:

https://issues.apache.org/jira/browse/THRIFT-3893

Upstream Commit:

https://github.com/apache/thrift/commit/2007783e874d524a46b818598a45078448ecc53e

Other sources

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.

Affected Software

3 affected componentsFixes available
go/github.com/apache/thrift<=0.9.3
0.10.0
Apache Thrift<=0.9.3
redhat/thrift<0.10.0
0.10.0

Event History

Feb 12, 2018
CVE Published
via MITRE·05:00 PM
Data Sourced
via MITRE·05:00 PM
DescriptionWeakness
Feb 13, 2018
Data Sourced
via Red Hat·04:32 AM
DescriptionSeverityAffected Software
May 13, 2022
Advisory Published
01:25 AM
May 5, 58339
Event
08:32 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2016-5397?

CVE-2016-5397 is a vulnerability in the Apache Thrift Go client library that exposes the potential for command injection during code generation due to the use of an external formatting tool.

2

How severe is CVE-2016-5397?

CVE-2016-5397 has a severity rating of 8.8, which is considered critical.

3

Which versions of Apache Thrift are affected by CVE-2016-5397?

Apache Thrift 0.9.3 and older versions are affected by CVE-2016-5397.

4

How can I fix CVE-2016-5397?

To fix CVE-2016-5397, you should upgrade to Apache Thrift 0.10.0 or newer.

5

Where can I find more information about CVE-2016-5397?

You can find more information about CVE-2016-5397 at the following references: [NVD](https://nvd.nist.gov/vuln/detail/CVE-2016-5397), [Red Hat Advisory RHSA-2018:2669](https://access.redhat.com/errata/RHSA-2018:2669), [Red Hat Advisory RHSA-2019:3140](https://access.redhat.com/errata/RHSA-2019:3140).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203