Skip to content

Local file disclosure - Users can read the content of any file on the server

High
vabene1111 published GHSA-jrgj-35jx-2qq7 Jan 28, 2025

Package

TandoorRecipes

Affected versions

<= 1.5.23

Patched versions

1.5.28

Description

Summary

The external storage feature allows any user to enumerate the name and content of files on the server

Details

Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer.

PoC

Create a new storage backend
image

Use it with an arbitray path, e.g. /opt/recipes/mediafiles/files

image

Click "Sync Now" and tandoor shows all filenames in the specified directory

image

This way it's e.g. possible to enumerate all uploaded files, even those from other users/spaces

The files in the mediafiles/files directory can then be viewed/downloaded

image

Further, we can import and view PDFs from ANY directiory
image

image

But it is also possible to enumerate files in other directories such as /etc

image

While the tandoor doesn't show their content in the frontend, because they are not PDF files, nor are in the mediafiles directory, we can use the API endpoint /api/get_recipe_file/[ID] in order to get the content.

E.g. here is the content of the /etc/passwd file
image

or the content of the /root/.ash_history file

image

Impact

We can view the content of any file on the server

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

CVE ID

CVE-2025-23212

Weaknesses

Credits