Skip to content
Path traversal Write-up Advanced

Testing Environment

Cisco UCS Director contained a chain of flaws: a filter bypass allowed unauthenticated access to the REST API, a logic error in the REST key check returned true when no valid key was supplied, an upload feature allowed arbitrary directory creation, and a download feature was vulnerable to directory traversal. An attacker could read arbitrary files, including the admin REST API key, leading to full remote code execution as root.

srcincite.io

Published on srcincite.io

This is the final blog post to my series of attacks against Cisco software. If you haven’t seen the previous posts, I recommend you check them out here and here.

The author, on srcincite.io

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 multiple design and implementation flaws: a request forwarding filter that bypassed authentication, a logic error in the REST key check that returned true on failure, an upload path that allowed directory creation via path traversal, and a download function that concatenated user input into a file path without proper validation.

Impact

An attacker could read arbitrary files, including the admin REST API key, leading to full remote code execution as root.

What the attacker needed

Network access to the web interface; no authentication required

How it was found

  1. Send a request to the cloupia application's /api/ path to trigger the RESTUrlRewriteFilter, which forwards the request to the protected RestAPI servlet, bypassing the RestAuth filter.
  2. Include the X-Cloupia-Request-Key header with any non-empty value and set opName to a value starting with 'userAPI' or containing ':userAPI' to reach the flawed isEnableRestKeyAccessCheckForUser method, which returns true even without a…
  3. Use the userAPIUnifiedImport operation with a crafted fileName containing directory traversal sequences to create the exports directory via the MyCallable call method.
  4. Use the userAPIDownloadFile operation with a fileName containing directory traversal sequences to read arbitrary files, such as the admin REST API key.

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.

This report describes several mistakes in a web application that, when combined, let an attacker bypass login and read files on the server. The attacker first found a way to reach protected parts of the app without logging in, then tricked a security check into saying 'yes' when it should say 'no', then created a folder and used a file download feature to read sensitive files. Reading the admin's API key gave the attacker full control, including running commands as the root user.

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.