Lucene search

K
githubGitHub Advisory DatabaseGHSA-2Q59-H24C-W6FG
HistoryApr 03, 2024 - 2:13 p.m.

Voilà Local file inclusion

2024-04-0314:13:02
CWE-73
GitHub Advisory Database
github.com
12
voilà
local file inclusion
vulnerability
impact
patches
original report
cwe-73
file access
voila-dashboards
security advisory

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

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

7.1 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

10.4%

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:

  • … [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.

Affected configurations

Vulners
Node
voilaRange<0.5.6
OR
voilaRange<0.4.4
OR
voilaRange<0.3.8
OR
voilaRange<0.2.17
CPENameOperatorVersion
voilalt0.5.6
voilalt0.4.4
voilalt0.3.8
voilalt0.2.17

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

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

7.1 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

10.4%

Related for GHSA-2Q59-H24C-W6FG