Skip to content
SSRF Write-up Intermediate

A tale of exploitation in spreadsheet file conversions

LibreOffice's file conversion process can be abused to read local files and access cloud metadata because it silently updates external links in documents. An attacker could upload a crafted document to a service that converts files, leading to local file disclosure or SSRF.

Brett Buerhaus Follow

Published on buer.haus

Slack would like to thank the researchers for their work to increase the security of the open source tool LibreOffice and their responsible disclosure to Slack. The security of file sharing is critically important to Slack and its users, and we worked with the research team to quickly implement a fix within 24 hours…

Brett Buerhaus (@bbuerhaus), Cody Brocious (@daeken), Sam Erb (@erbbysam), Olivier Beg (@smiegles), on buer.haus

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the unoconv library sets UpdateDocMode to QUIET_UPDATE, which silently updates external links during conversion, and LibreOffice's file type detection relies on content rather than extension, allowing malicious files to be processed.

Impact

An attacker could read local files and capture AWS credentials from the server, but this depends on link updates being enabled and may be limited by sandboxing.

What the attacker needed

Victim uploads crafted document; link updates enabled; server uses unoconv or similar

The fix

unoconv was updated to a safer default in version 0.9, and developers should sandbox document parsing.

How it was found

  1. Create a new spreadsheet in LibreOffice
  2. Insert an OLE object from a file and check 'link to file'
  3. Enter a URL to an actual file
  4. Save the file and modify content.xml to replace the URL with a local file path
  5. Rename the file to have an .xlsx extension
  6. Upload to a vulnerable web server that processes the document

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 write-up has not been written yet. The Original tab links to the source.

When a website converts your uploaded document to PDF, it uses software like LibreOffice. This software can be tricked into fetching files from the server it runs on, like reading /etc/passwd or accessing cloud credentials. The problem is that the converter automatically follows links in the document without asking.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More from Slack

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.