Skip to content
Path traversal Advisory Beginner CVE-2023-43662

GHSL-2023-191: Arbitrary File Read in ShokoServer - CVE-2023-43662

The /api/Image/WithPath endpoint in ShokoServer accepts a file path parameter without sanitisation and returns the file contents, allowing unauthenticated attackers to read arbitrary files on Windows systems. This could expose sensitive information because the server runs as administrator.

Kwstubbs Follow

Originally disclosed on GitHub Security Lab

An arbitrary file read exists in the /api/Image/WithPath endpoint that would allow unauthenticated attackers to read arbitrary files on Windows systems.

Kwstubbs, on GitHub Security Lab

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

How it worked

Root cause

The endpoint fails to validate or restrict the user-supplied file path before passing it to a file-open function.

Impact

An unauthenticated attacker could read sensitive files on the server, and because the installer runs the service as administrator, this may expose highly privileged information.

What the attacker needed

ShokoServer instance accessible; No authentication required

How it was found

  1. Send a request to the /api/Image/WithPath endpoint with a file path as the serverImagePath parameter.
  2. The server checks if the file exists and returns its contents if it does.

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

ShokoServer is a media server. One of its web addresses is meant to show default images, but it takes a file path from the user and opens that file without checking it. So anyone can ask the server to read any file on the computer, like a password file, and see its contents.

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 Kwstubbs

View all

43 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

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.