Maliciously crafted CSV document leads, in violation of RFC4180, to remote code execution.
Steps to Reproduce:
No RCE. Fields must not be interpreted as formulas in such kinds of documents.
User Profile Reset: No
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Please, have a look at https://www.libreoffice.org/about-us/security/
@Eike: you may be interested in this bug report.
Best regards. JBF
Actually, this is not a "remote" code execution. And this doesn't differ from any other spreadsheet file being opened in a spreadsheet application, where formulas can appear. If you use XLS, or ODS, or anything, there are formulas, and they may do all the same kind of things. The only difference here is that it's not a widespread knowledge that CSV files can contain that, too, despite the RFC says otherwise.
RFC is great, but current state (with billions of existing files that require to keep working) is the de-facto standard. And that isn't gonna change. The only things required (not here, but universally) is amendment to the RFC that makes it up-to-date, and wide informing.
@Mike Kaganski, should it be closed as RESOLVED WONTFIX ?
(In reply to Xisco Faulí from comment #3)
> @Mike Kaganski, should it be closed as RESOLVED WONTFIX ?
If I understand well what Mike wrote, it should be closed as RESOLVED NOTABUG.
WONTFIX agrees there is a problem in LibreOffice. It seems it is not the case.
Best regards. JBF
Well, I'd close it as WONTFIX (after updating our help), because the issue of discrepancy between documentation and implementation indeed exists.
But I only expressed my personal opinion, and I suppose that erAck's opinion here is much more relevant.
With master, 6.0.1 and 5.4.5 if a DDE() function is used in a formula imported (also from CSV) it leads to the "This file contains links to other files. Should they be updated?" dialogue and the function is only executed after confirmation. On master the modal dialogue was changed to an InfoBar (and reading "This file contains links to other files or external resources" to point out it's not only about local files) so the user can inspect Edit -> Links what external data would be accessed before confirming.
We could add yet another option to the CSV import dialogue like "Import formulas as text" or some such and pre-set checked for unaware users.
Adjusting title because with the current releases there is no vulnerability, executing DDE is not possible without user interaction.
(In reply to Mike Kaganski from comment #2)
> this doesn't differ from any other spreadsheet file being opened in a spreadsheet application, where formulas can appear. If you use XLS, or ODS, or anything, there are formulas, and they may do all the same kind of things.
I disagree. CSV is not a "spreadsheet file" comparable to XLS or ODS. CSV is Comma-separated values (where all values are text).
When importing, say, a CSV file with a list of comments, I would not expect formulas to be executed only because a comment started with an equals sign.