Skip to content
Path traversal Write-up Intermediate

Wind River VxWorks tarExtract directory traversal vulnerability (CVE-2023-38346)

The tarExtract function in Wind River VxWorks processes tar archives with relative or absolute file names, allowing files to be written outside the intended directory. An attacker could supply a crafted tar file to overwrite arbitrary files, potentially leading to system compromise or bypassing verification steps.

Tobias Ospelt Follow

Published on pentagrid.ch

Today we publish an advisory for a specific function in Wind River's VxWorks operating system.

Pentagrid AG, on pentagrid.ch

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

Impact

If tarExtract runs with elevated privileges, an attacker could overwrite arbitrary files, potentially leading to system compromise or bypassing verification steps.

What the attacker needed

Program code that passes an untrusted tar file to tarExtract; tarExtract runs with elevated privileges

The fix

Wind River should implement file name filtering and add an explicit force parameter to process insecure filenames, and update documentation to warn about untrusted tar files.

How it was found

  1. Create a tar archive containing a file with a relative path that traverses directories.
  2. Pass the crafted tar archive to the VxWorks tarExtract function.
  3. The function extracts the file to a location outside the current working directory.

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 you unpack a tar file, you expect files to stay inside the folder you are unpacking into. But VxWorks' tarExtract does not check for file names that try to escape that folder, so a malicious tar file can write files anywhere on the device. This could let an attacker replace important files and take control of the device.

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.