Skip to content

Missing Authorization with Default Settings in Dashboard UI

High severity GitHub Reviewed Published Nov 2, 2021 in HangfireIO/Hangfire • Updated Jan 29, 2023

Package

nuget Hangfire.Core (NuGet)

Affected versions

= 1.7.25

Patched versions

1.7.26

Description

Dashboard UI in Hangfire.Core uses authorization filters to protect it from showing sensitive data to unauthorized users. By default when no custom authorization filters specified, LocalRequestsOnlyAuthorizationFilter filter is being used to allow only local requests and prohibit all the remote requests to provide sensible, protected by default settings.

However due to the recent changes, in version 1.7.25 no authorization filters are used by default, allowing remote requests to succeed.

Impact

Missing authorization when default options are used for the Dashboard UI, e.g. when no custom authorization rules are used as recommended in the Using Dashboard documentation article.

Impacted

If you are using UseHangfireDashboard method with default DashboardOptions.Authorization property value, then your installation is impacted:

app.UseHangfireDashboard(); // Impacted
app.UseHangfireDashboard("/hangfire", new DashboardOptions()); // Impacted

Not Impacted

If any other authorization filter is specified in the DashboardOptions.Authorization property, the you are not impacted:

app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
    Authorization = new []{ new SomeAuthorizationFilter(); } // Not impacted
});

Patches

Patch is already available in version 1.7.26 and already available on NuGet.org, please see Hangfire.Core 1.7.26. Default authorization rules now prohibit remote requests by default again by including the LocalRequestsOnlyAuthorizationFilter filter to the default settings. Please upgrade to the newest version in order to mitigate the issue.

Workarounds

It is possible to fix the issue by using the LocalRequestsOnlyAuthorizationFilter explicitly when configuring the Dashboard UI. In this case upgrade is not required.

// using Hangfire.Dashboard;

app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
    Authorization = new []{ new LocalRequestsOnlyAuthorizationFilter(); }
});

References

Original GitHub Issue: HangfireIO/Hangfire#1958

References

@odinserj odinserj published to HangfireIO/Hangfire Nov 2, 2021
Published by the National Vulnerability Database Nov 2, 2021
Reviewed Nov 2, 2021
Published to the GitHub Advisory Database Nov 3, 2021
Last updated Jan 29, 2023

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
Low
Availability
Low

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:L/A:L

EPSS score

0.136%
(49th percentile)

Weaknesses

CVE ID

CVE-2021-41238

GHSA ID

GHSA-7rq6-7gv8-c37h

Source code

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