ESB-2018.1035 - [Win][UNIX/Linux] HiveServer2: Multiple vulnerabilties 2018-04-05

Printable version
PGP/GPG verifiable version

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                               ESB-2018.1035
                   HiveServer2 multiple vulnerabilities
                               5 April 2018

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           HiveServer2
Publisher:         The Apache Software Foundation
Operating System:  UNIX variants (UNIX, Linux, OSX)
                   Windows
Impact/Access:     Execute Arbitrary Code/Commands -- Remote/Unauthenticated
                   Unauthorised Access             -- Remote/Unauthenticated
                   Modify Arbitrary Files          -- Remote/Unauthenticated
Resolution:        Patch/Upgrade
CVE Names:         CVE-2018-1315 CVE-2018-1284 CVE-2018-1282

Original Bulletin: 
   http://mail-archives.us.apache.org/mod_mbox/www-announce/201804.mbox/ajax/%3CCABDpyCjSKaT9bVNajr0L52b_abuxHL0xWLB%3D5%2B%2BytUzD_JyCRg%40mail.gmail.com%3E
   http://mail-archives.us.apache.org/mod_mbox/www-announce/201804.mbox/ajax/%3CCABDpyChmEOPSBAxb%2BipyGVfhuS4Zq%2Bw0CFn-EANy%2B_TD0o-8%2Bw%40mail.gmail.com%3E
   http://mail-archives.us.apache.org/mod_mbox/www-announce/201804.mbox/ajax/%3CCABDpyChQXi-JSh%3DbytOLsdq7o%2BeSst6hU_s8RN4jQoPzLR2vLQ%40mail.gmail.com%3E

Comment: This bulletin contains three (3) The Apache Software Foundation 
         security advisories.

- --------------------------BEGIN INCLUDED TEXT--------------------

CVE-2018-1282: JDBC driver is susceptible to SQL injection attack if
the input parameters are not properly cleaned

Severity: Important

Vendor: The Apache Software Foundation

Versions Affected: This vulnerability affects all versions of Hive
JDBC driver from 0.7.1

Description: This vulnerability in Hive allows carefully crafted arguments to be
used to bypass the argument escaping/cleanup that JDBC driver does in
PreparedStatement implementation.

Mitigation: It is recommended to upgrade prior version of Hive JDBC
driver to 2.3.3.
Note Hive JDBC driver is not backward compatible with HiveServer2,
which means newer version of Hive JDBC driver may not talk to older version
of HiveServer2. In particular, Hive JDBC driver 2.3.3 won't talk
to HiveServer2 2.1.1 or prior. If user is using Hive code 2.1.1 or below
they might need to upgrade all the Hive instances to 2.3.3.


Alternative to the upgrade, is to take the follow two actions in your
Hive JDBC client code/application when dealing with user provided
input in PreparedStatement:
1. Avoid passing user input PreparedStatement.setBinaryStream
2. Sanitize the user input for PreparedStatement.setString, by
replacing all occurrences of \' to '


==============================================================================


CVE-2018-1284: Hive UDF series UDFXPathXXXX allow users to pass
carefully crafted XML to access arbitrary files

Severity: Important

Vendor: The Apache Software Foundation

Versions Affected: This vulnerability affects all versions from 0.6.0

Description: Malicious user might use any xpath UDFs
(xpath/xpath_string/xpath_boolean/xpath_number/xpath_double/xpath_float/xpath_long/xpath_int/xpath_short)
to expose the content of a file on the machine running HiveServer2
owned by HiveServer2 user (usually hive) if
hive.server2.enable.doAs=false.

Mitigation: Users who use xpath UDFs in HiveServer2 and
hive.server2.enable.doAs=false are recommended to upgrade to 2.3.3, or
update UDFXPathUtil.java to the head of branch-2.3 and rebuild
hive-exec.jar: https://git1-us-west.apache.org/repos/asf?p=hive.git;a=blob;f=ql/src/java/org/apache/hadoop/hive/ql/udf/xml/UDFXPathUtil.java;hb=refs/heads/branch-2.3.
If these functions are not being used at present, you can also
disable its use by adding them to the value of the config
hive.server2.builtin.udf.blacklist.


==========================================================================

CVE-2018-1315: 'COPY FROM FTP' statement in HPL/SQL can write to
arbitrary location if the FTP server is compromised

Severity: Moderate

Vendor: The Apache Software Foundation

Versions Affected: Hive 2.1.0 to 2.3.2

Description: When 'COPY FROM FTP' statement is run using HPL/SQL extension to
Hive, a compromised/malicious FTP server can cause the file to be
written to an arbitrary location on the cluster where the command is
run from. This is because FTP client code in HPL/SQL does not verify
the destination
location of the downloaded file. This does not affect hive
cli user and hiveserver2 user as hplsql is a separate command line
script and needs to be invoked differently.

Mitigation: User who use HPL/SQL with Hive 2.1.0 through 2.3.2 should upgrade to
2.3.3 which removes support for "COPY FROM FTP". Alternatively, the
usage of HPL/SQL can be disabled through
other means.

Credit: This issue was discovered by Danny Grander of Snyk


Credit: This issue was discovered by Bear Giles of SnapLogic

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        https://www.auscert.org.au/bulletins/

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQIVAwUBWsW0Iox+lLeg9Ub1AQjwBA/+KcX4WDUt0QauOvj5E8/wSFgGTgAIr90h
jaRIHDkwJKp5LOaUjJeOFyBjlUXzl4tBKcTvXA3hXo9A1vkNVWgDFkK1W8RXntCp
pQvK01GZ46eVJEMXIiNRoDtSSxQgBfZyrbH1UfDU2v9rY1zu3Xsmc3nHHNSTsOLG
K2nc5Nx2pAIyXYuGfGOnWpIhoxIbXpZMyh98Rtm2i9mn1w+0J37gsuVokNssTMpy
VhD8VAe0ZWoiz/vofp5Xn2mYmMHX6w5hpDQhTX/+YEmqhJou0L2gdEq58n9zAoER
S0xhdIL9WjVkxKDGWAf8Q6YCHTJdoQsE1bLMQsPfa3UceNVNwQZB3DrAHrmeCKFz
vRRskuQfh6dvjFagsyo0wN54cRDQJ5OlVTmuswG9F0x0ilDsK+bWbrcIuzuSk61I
vPZpB0DN+rv8GLJOXmKb/fSVuAYkLHecKeDtlmLrCmGiWm54+hyYHh7BK2IwTvfd
3T4COpAF6T6xDXPhZbf3kRDIwPRUUdwkdQe8Og3bVauVuBN+7CTwoNSFjaULX3yI
Csj3ivS3kyGIuTfgP6L0Mt1CHLz54I7aPBDItiRib+Vf4miGFHd2tHC/uzqsXExW
xT8g5E497dUeQkYLD6+p0lqUb90pihA4K3c6MIxJKjkGuMlCse3KFOehmcyGzObO
pAoCdDR8bD0=
=GZKo
-----END PGP SIGNATURE-----

« Back to bulletins