# CVE-2026-63135: YOURLS: Stored XSS in referrer statistics chart via crafted Referer header

> An attacker can inject malicious JavaScript into YOURLS statistics via a crafted Referer header, leading to code execution and data theft when viewed by admins.

- **Severity:** High 8.2 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 21 Aug 2026
- **Updated:** 26 Aug 2026
- **Also known as:** GHSA-5h77-88j3-r659

## What is CVE-2026-63135?

CVE-2026-63135 is a high-severity cross-site scripting vulnerability in YOURLS, published on 21 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

YOURLS is a self-hosted, customizable URL shortener written in PHP. From 1.5.1 until 1.10.4, YOURLS stores the HTTP Referer header through yourls_get_referrer(), yourls_sanitize_url_safe(), and yourls_log_redirect(), then aggregates the value in yourls-infos.php and passes the derived domain through yourls_get_domain(), yourls_stats_pie(), and yourls_google_array_to_data_table(). The chart builder concatenates labels into inline JavaScript without JavaScript-string escaping, so an unauthenticated attacker can poison the statistics of an existing short URL with a crafted referrer. When an administrator or public stats-page viewer opens the affected statistics page, attacker-controlled JavaScript executes in the YOURLS origin and can access admin-visible data, the API signature token, and privileged same-origin actions. This issue is fixed in version 1.10.4.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2026-63135?

2 open source packages ship an affected version, including yourls/yourls.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `yourls/yourls` | Packagist | From 1.5.1 | 1.10.4 |
| `yourls/yourls` | Packagist | From 1.5.1 | 1.10.4 |

## How do I fix CVE-2026-63135?

Upgrade yourls/yourls to 1.10.4 or later.

## Is CVE-2026-63135 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-63135 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-63135 and fix it if it is affected.

What it is: CVE-2026-63135 is a high-severity cross-site scripting vulnerability in YOURLS, published on 21 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-63135 exists.

Affected packages and fixed versions:
- yourls/yourls (Packagist): affected from 1.5.1; fixed in 1.10.4
- yourls/yourls (Packagist): affected from 1.5.1; fixed in 1.10.4

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-63135/ (Markdown: https://insights.sbomify.com/CVE-2026-63135/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-63135
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-63135
- OSV: https://osv.dev/vulnerability/CVE-2026-63135

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-63135/
Summaries are generated and may contain mistakes; the official description above is the record.
