Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS0ycTU5LWgyNGMtdzZmZ84AA6ks

Voilà Local file inclusion

Impact

Any deployment of voilà dashboard allow local file inclusion, that is to say any file on a filesystem that is readable by the user that runs the voilà dashboard server can be downloaded by someone with network access to the server.

Whether this still requires authentication depends on how voilà is deployed.

Patches

This is patched in 0.2.17+, 0.3.8+, 0.4.4+, 0.5.6+

Workarounds

None.

References

CWE-73: External Control of File Name or Path

Original report

I have found a local file inclusion vulnerability in one of your subprojects, voila (https://github.com/voila-dashboards/voila).

The vulnerability exists in the "/static" Route, and can be exploited by simply making a request such as this:

$ curl localhost:8866/static/etc/passwd

...or by using a webbrowser to download the file.

I dug into the source code, and I think the offending line is here: https://github.com/voila-dashboards/voila/blob/8419cc7d79c0bb1dabfbd9ec49cb957740609d4d/voila/app.py#L664
"static_path" gets set to "/", irrespective of the actual "--static" cli option. Because of that, the tornado.web.StaticFileHandler gets initialized with path="/". Then, tornado.web.StaticFileHandler.get calls tornado.web.StaticFileHandler.get_absolute_path with root="/" and path="[USER SUPPLIED PATH]", which leads to local file inclusion. An attacker can request any file on the system they want (that the user running voila has access to).

I suspect this was an oversight during development. Setting static_path=self.static_root (the aforementioned correct cli option) in line 664 provides the intended behavior and restricts the file access to the static directory.
From what I can tell, this line has been in the repository since September 2018. This is the commit that added it: https://github.com/voila-dashboards/voila/commit/28faacc9b03b160fd8fa920ad045f4ec0667ab67

I have found multiple voila instances online that are impacted, such as:

...but many more probably exist. They're easy to identify by [redacted] Therefore the Issue should be fixed as soon as possible, and a security advisory should be released to inform the impacted users.

Permalink: https://github.com/advisories/GHSA-2q59-h24c-w6fg
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0ycTU5LWgyNGMtdzZmZ84AA6ks
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 2 months ago
Updated: about 2 months ago


CVSS Score: 7.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Identifiers: GHSA-2q59-h24c-w6fg, CVE-2024-30265
References: Repository: https://github.com/voila-dashboards/voila
Blast Radius: 22.1

Affected Packages

pypi:voila
Dependent packages: 52
Dependent repositories: 892
Downloads: 128,720 last month
Affected Version Ranges: >= 0.5.0a0, < 0.5.6, >= 0.4.0a0, < 0.4.4, >= 0.3.0a0, < 0.3.8, >= 0.0.2, < 0.2.17
Fixed in: 0.5.6, 0.4.4, 0.3.8, 0.2.17
All affected versions: 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.14, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.1.11, 0.1.12, 0.1.13, 0.1.14, 0.1.15, 0.1.16, 0.1.17, 0.1.18, 0.1.19, 0.1.20, 0.1.21, 0.1.22, 0.1.23, 0.1.24, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10, 0.2.11, 0.2.12, 0.2.13, 0.2.14, 0.2.15, 0.2.16, 0.3.0, 0.3.0-a0, 0.3.0-a1, 0.3.0-a2, 0.3.0-b0, 0.3.0-rc0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.4.0, 0.4.0-a0, 0.4.0-a1, 0.4.0-a2, 0.4.0-b0, 0.4.0-rc0, 0.4.0-rc1, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.5.0-a0, 0.5.0-a1, 0.5.0-a2, 0.5.0-a3, 0.5.0-a4, 0.5.0-a5, 0.5.0-b0, 0.5.0-b1, 0.5.0-rc0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5
All unaffected versions: 0.0.0, 0.0.1, 0.2.17, 0.3.8, 0.4.4, 0.5.6