Skip to content
Path traversal Write-up Intermediate

CVE-2020-1300: Remote Code Execution Through Microsoft Windows CAB Files

A directory traversal vulnerability in Microsoft Windows CAB file handling allows a crafted CAB file to write files outside the intended temporary folder. An attacker could exploit this to execute arbitrary code with SYSTEM privileges by enticing a user to open a malicious file or install a remote printer.

zerodayinitiative.com

Published on zerodayinitiative.com

A directory traversal vulnerability has been reported in Microsoft Windows. The vulnerability is due to a lack of sanitization of file paths inside a CAB file.

The author, on zerodayinitiative.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 affected function checks for directory traversal using backslashes (..\) but fails to consider forward slashes (../), allowing path traversal.

Impact

Successful exploitation could result in the execution of arbitrary code in the security context of SYSTEM.

What the attacker needed

Victim opens a crafted CAB file; or victim installs a remote printer

How it was found

  1. Create a CAB file with a CFFILE entry whose szName field contains multiple '../' sequences.
  2. Deliver the crafted CAB file to the target or set up a remote printer with the malicious CAB file.
  3. Entice the victim to open the crafted file or install the remote printer.
  4. The affected application extracts the file outside the intended temporary folder, writing to an arbitrary location.

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.

A CAB file is like a ZIP archive used by Windows. The bug is that when Windows extracts files from a CAB, it doesn't properly check the file names inside, so a malicious CAB can make Windows write files to any location on the disk. Because the extraction often runs with high privileges, an attacker could place a harmful file that later runs with full system rights.

What is Path traversal?

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

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.