{"answers":{"affected":"2 open source packages ship an affected version, including copyparty.","exploited":"There is no known exploitation of GHSA-cw7j-v52w-fp5r in the wild and no public exploit code.","fix":"Upgrade copyparty to 1.8.6 or later.","what":"GHSA-cw7j-v52w-fp5r is a cross-site scripting vulnerability in copyparty, published on 21 Jul 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-cw7j-v52w-fp5r and fix it if it is affected.\n\nWhat it is: GHSA-cw7j-v52w-fp5r is a cross-site scripting vulnerability in copyparty, published on 21 Jul 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-cw7j-v52w-fp5r in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- copyparty (PyPI): affected all versions; fixed in 1.8.6\n- copyparty (PyPI): affected all versions; fixed in 1.8.6\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-cw7j-v52w-fp5r/ (Markdown: https://insights.sbomify.com/GHSA-cw7j-v52w-fp5r/index.md)","id":"GHSA-cw7j-v52w-fp5r","markdown":"https://insights.sbomify.com/GHSA-cw7j-v52w-fp5r/index.md","name":"GHSA-cw7j-v52w-fp5r","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"copyparty file server","requires_auth":"none","summary":"Reflected XSS in copyparty allows attackers to execute scripts via malicious links, potentially modifying or deleting files.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Summary\nThe application contains a reflected cross-site scripting via URL-parameter `?hc=...`\n\n### Details\nA reflected cross-site scripting (XSS) vulnerability exists in the web interface of the application that could allow an attacker to execute malicious javascript code by tricking users into accessing a malicious link.\n\nThe worst-case outcome of this is being able to move or delete existing files on the server, or upload new files, using the account of the person who clicks the malicious link.\n\nIt is recommended to change the passwords of  your copyparty accounts, unless you have inspected your logs and found no trace of attacks.\n\n### Checking for exposure\nif copyparty is running behind a reverse proxy, you can check the access-logs for traces of attacks, by grepping for URLs containing `?hc=` with `\u003c` somewhere in its value, for example using the following command:\n* nginx:\n  ```bash\n  (gzip -dc access.log*.gz; cat access.log) | sed -r 's/\" [0-9]+ .*//' | grep -E '[?\u0026](hc|pw)=.*[\u003c\u003e]'\n  ```\n\n### PoC\n* `http://127.0.0.1:3923/?hc=\"\u003e\u003cscript\u003ealert(1);\u003c/script\u003e`\n* `http://127.0.0.1:3923/?pw=\u003cscript\u003ealert(1);\u003c/script\u003e`","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"copyparty vulnerable to reflected cross-site scripting via hc parameter","id":"GHSA-cw7j-v52w-fp5r","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2023"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["1.8.6"],"introduced":["0"],"last_affected":[],"package":"copyparty","purl":null,"source":"GHSA-cw7j-v52w-fp5r"},{"ecosystem":"PyPI","fixed":["1.8.6"],"introduced":["0"],"last_affected":[],"package":"copyparty","purl":"pkg:pypi/copyparty","source":"GHSA-cw7j-v52w-fp5r"}],"products":null,"published":"2023-07-21","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Reflected XSS in copyparty allows attackers to execute scripts via malicious links, potentially modifying or deleting files.","url":"https://insights.sbomify.com/GHSA-cw7j-v52w-fp5r/"}