Skip to content
Path traversal Write-up Intermediate

Unzipping Dangers: OpenRefine Zip Slip Vulnerability

OpenRefine versions up to 3.7.3 had a Zip Slip vulnerability in the project import feature: when extracting a malicious archive, filenames containing path traversal sequences were not validated, allowing files to be written outside the intended directory. An attacker could trick a user into importing a crafted project file, leading to arbitrary code execution on the user's machine.

Stefan Schiller Follow

Published on sonarsource.com

OpenRefine is a Java-based open-source data cleaning and transformation tool. This includes loading different types of data, cleaning it, converting it, and extending it.

Stefan Schiller (@scryh_), on sonarsource.com

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

The archive extraction method used the file name from the archive entry directly to create the output file path without checking that the resulting path stayed inside the intended destination directory.

Impact

An attacker could execute arbitrary code on the user's machine, but only if the user is tricked into importing a malicious project file; the application's CSRF protection prevents exploitation without user interaction.

What the attacker needed

Victim uses OpenRefine 3.7.3 or below; victim imports a malicious project file

How it was found

  1. Create a malicious archive containing a file with a name that includes path traversal sequences.
  2. Trick a user into importing this archive via the project import feature, either by uploading it or providing a URL.
  3. The application extracts the archive without validating the file paths, writing files outside the intended directory.
  4. Overwrite an existing .class file in the WEB-INF/classes folder.
  5. The auto-reload feature detects the change and restarts the web application context, loading the attacker's class and executing arbitrary code.

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.

OpenRefine is a tool that runs on your own computer and lets you clean up data in your web browser. It can import project files that are actually zip archives. The bug meant that a specially crafted archive could contain file names that tell the program to write files outside the intended folder, even overwriting program files. If a user imported such a file, the attacker could run their own code on that computer.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More by Stefan Schiller

View all

10 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.