Skip to content
Path traversal Disclosed report Intermediate CVE-2024-32005

NiceGUI allows potential access to local file system

A local file inclusion flaw in the NiceGUI leaflet component allowed an attacker to read any file on the backend filesystem that the web server could access. The issue was fixed in version 1.4.21.

zauberzeug/nicegui

Originally disclosed on huntr

NiceGUI is an easy-to-use, Python-based UI framework. A local file inclusion is present in the NiceUI leaflet component when requesting resource files under the /_nicegui/{__version__}/resources/{key}/{path:path} route.

As a result any file on the backend filesystem which the web server has access to can be read by an attacker with access to the NiceUI leaflet website.

This vulnerability has been addressed in version 1.4.21. Users are advised to upgrade. There are no known workarounds for this vulnerability.

From the GitHub Advisory Database (GHSA-mwc7-64wg-pgvj, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

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 route that serves leaflet resource files did not validate or restrict the requested path, allowing directory traversal to arbitrary files.

Impact

An attacker with access to the NiceGUI leaflet website could read any file on the backend filesystem that the web server has access to.

What the attacker needed

Access to the NiceGUI leaflet website

The fix

The vulnerability was fixed in version 1.4.21; users should upgrade.

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.

A web server often serves files from a specific folder, but a bug can let someone ask for files outside that folder. Here, a part of the NiceGUI framework that handles map resources did not properly restrict which files could be requested. This meant an attacker could read sensitive files stored on the server, like configuration or password files.

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.