Skip to content
Memory corruption Advisory Intermediate CVE-2017-2919

libxls xls_getfcell Code Execution Vulnerability

A stack-based buffer overflow exists in the xls_getfcell function of libxls 1.3.4 when parsing a specially crafted XLS file with a long string in a LabelSst cell. An attacker could exploit this to cause memory corruption and potentially achieve remote code execution.

Marcin 'Icewall' Noga Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable stack based buffer overflow vulnerability exists in the xlsgetfcell function of libxls 1.3.4. A specially crafted XLS file can cause a memory corruption resulting in remote code execution.

Marcin 'Icewall' Noga, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The function copies a string from the file into a fixed-size stack buffer without checking its length, causing a stack-based buffer overflow.

What the attacker needed

Victim opens a malicious XLS file

How it was found

  1. Craft an XLS file containing a LabelSst cell with a very long string in the shared string table.
  2. Open the crafted XLS file with a program that uses libxls, such as xls2csv.
  3. The program crashes with a segmentation fault due to the buffer overflow.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This report describes a bug in a library that reads old Excel files. When the program copies a very long piece of text from the file into a fixed-size memory area, it overflows and corrupts nearby memory, which can crash the program or let an attacker run their own code.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Marcin 'Icewall' Noga

View all

146 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.