Skip to content

Voilà Local file inclusion

High severity GitHub Reviewed Published Apr 3, 2024 in voila-dashboards/voila • Updated Apr 4, 2024

Package

pip voila (pip)

Affected versions

>= 0.0.2, < 0.2.17
>= 0.3.0a0, < 0.3.8
>= 0.4.0a0, < 0.4.4
>= 0.5.0a0, < 0.5.6

Patched versions

0.2.17
0.3.8
0.4.4
0.5.6

Description

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: voila-dashboards/voila@28faacc

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

  • ... [redacted]
  • ... [redacted]
  • ... [redacted]

...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.

References

@martinRenou martinRenou published to voila-dashboards/voila Apr 3, 2024
Published to the GitHub Advisory Database Apr 3, 2024
Reviewed Apr 3, 2024
Published by the National Vulnerability Database Apr 3, 2024
Last updated Apr 4, 2024

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
None
User interaction
None
Scope
Unchanged
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:N/UI:N/S:U/C:H/I:N/A:N

EPSS score

0.044%
(12th percentile)

Weaknesses

CVE ID

CVE-2024-30265

GHSA ID

GHSA-2q59-h24c-w6fg

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.