Skip to content

Directory traversal attack of static file serving.

High
dannon published GHSA-grjf-2ghx-q77x Dec 6, 2022

Package

No package listed

Affected versions

>= 22.01

Patched versions

>= 22.01

Description

An arbitrary file read exists in Galaxy 22.01 and Galaxy 22.05 due to the switch to Gunicorn, which can be used to read any file accessible to the user under which Galaxy is running.

Impact

This vulnerability affects Galaxy 22.01 and higher, after the switch to gunicorn, which serve static contents directly. Additionally, the vulnerability is mitigated when using Nginx or Apache to serve /static/* contents, instead of Galaxy's internal middleware.

Deployment Method Version Vulnerable
Galaxy Ansible Roles * Safe
* + nginx * Partially vulnerable, file read is contained to lib/galaxy/webapps/base/ and its subdirectories (which include static which is already exposed intentionally, and templates which was not.)
* + apache * Safe
run.sh + nginx * Safe
run.sh directly exposed <22.01 Safe
run.sh directly exposed >=22.01 Vulnerable

Patches

A patch can be found at:

https://depot.galaxyproject.org/patch/GX-2022-0001/static-traversal.patch

To apply the patch, navigate to the root of your Galaxy directory, then execute:

wget -O - https://depot.galaxyproject.org/patch/GX-2022-0001/static-traversal.patch | patch -p1

or:

curl https://depot.galaxyproject.org/patch/GX-2022-0001/static-traversal.patch | patch -p1

You can test application of the patch before applying it by adding the --dry-run flag to patch.

For the changes to take effect, you must restart all Galaxy server processes.

Workarounds

You must patch with this patch to prevent this vulnerability, if you are in one of the vulnerable configurations.

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

CVE ID

CVE-2022-23470

Credits