{"items":[{"id":"NVI-00001836","kind":"vulnerability","title":"YOURLS is vulnerable to XSS through JSONP and Callback request parameters","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-6mp4-q625-mxjp"],"plain_summary":"OSV carries this publisher advisory for yourls/yourls. This is an aggregated source copy; consult the original publisher and compare update dates.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-0261b5825b8a51affed79b2a8def1028"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-0261b5825b8a51affed79b2a8def1028","url":"https://github.com/advisories/GHSA-6mp4-q625-mxjp","basis":"vendor_advisory","notes":"GitHub-origin advisory, CC-BY-4.0; OSV is an aggregate copy, not independent corroboration.","title":"GHSA-6mp4-q625-mxjp","publisher":"GitHub Advisory Database via OSV","observed_at":"2026-10-31T21:41:59.938Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-0261b5825b8a51affed79b2a8def1028"],"technology":"yourls/yourls","known_exclusions":[],"conditions_summary":"### 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&format=jsonp&callback=alert(document.domain)//\"\n`\n**Expected response:** `alert(document.domain)//({\"version\":\"1.10.2\",\"callb","public_affected_ranges":["ECOSYSTEM: introduced 0; last_affected 1.10.2"]}],"null_published_at":"2026-10-31T21:53:28.052Z","source_updated_at":"2025-12-30T20:06:36.662Z","source_disclosed_at":"2025-12-30T19:34:26.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-10-31T21:41:59.938Z"}],"next_cursor":null,"snapshot_revision":"42594"}