Skip to content
Memory corruption Advisory Advanced CVE-2017-12110

libxls xls_appendSST Code Execution Vulnerability

An integer overflow in the xls_appendSST function of libxls 1.4 allows a crafted XLS file to cause an out-of-bounds write, leading to memory corruption and potential remote code execution.

Marcin 'Icewall' Noga Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable integer overflow vulnerability exists in the xlsappendSST function of libxls 1.4. A specially crafted XLS file can cause 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 number of strings from the file is used to allocate an array, but the code later writes more entries than allocated because it does not check the count against the actual number of strings.

Impact

A crafted XLS file could cause memory corruption and potentially allow remote code execution.

What the attacker needed

Victim opens a malicious XLS file

How it was found

  1. Craft an XLS file with an SST record where the string count is set to 1 but multiple strings are present.
  2. Open the crafted file with a program that uses libxls, such as the readxl package in R.
  3. The program allocates space for one string but attempts to store more, causing an out-of-bounds write.

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.

libxls is a library that reads old Excel files. A bug in how it counts strings lets a malicious file write past the end of a memory buffer, 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.