GHSL-2023-203_GHSL-2023-204: Several vulnerabilities in audiobookshelf
Audiobookshelf had an SSRF and arbitrary file read/deletion in the author image update endpoint, and a path traversal in the HLS endpoint allowing any user to read local files. An attacker could read arbitrary files, delete files, or make the server send requests to internal URLs.
Audiobookshelf is vulnerable to server-side request forgery (SSRF), arbitrary file read (AFR) and arbitrary file deletion (AFD) depending on the permissions of the user.
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
Likely the application trusted user-supplied file paths and URLs without validating that they stayed within the intended directory or blocked internal network requests.
Impact
This could lead to information disclosure, and with update permission also arbitrary file deletion and SSRF to internal services.
What the attacker needed
Update permission for SSRF/file read/delete; any authenticated user for HLS path traversal
How it was found
- Send a PATCH request to /api/authors/author-id with an imagePath set to a URL to trigger SSRF, or to a local file path to read it.
- For SSRF, download the fetched file from /api/authors/author-id/image.
- For file deletion, first set imagePath to the target file, then send another PATCH with an empty imagePath to delete it.
- For path traversal, send a GET request to /hls/whatever/ followed by URL-encoded ../ sequences and the target file path.
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.
The app let users set an author's image by providing a path or URL. It did not check that the path stayed inside the intended folder, so someone could point it at any file on the server, or at an internal web address, and the server would fetch or read it. A second bug in a video streaming endpoint let any logged-in user use '..' in the URL to climb out of the intended folder and read any file.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.