CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-63135

CVE-2026-63135: Stored Cross-Site Scripting (XSS) via Referer Header in YOURLS

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 22, 2026·6 min read·0 visits

Executive Summary (TL;DR)

Unauthenticated stored XSS in YOURLS via crafted Referer headers allows hijacking administrative browser sessions when administrators view short URL statistics.

CVE-2026-63135 is a critical stored Cross-Site Scripting (XSS) vulnerability affecting YOURLS (Your Own URL Shortener) versions 1.5.1 up to (but not including) 1.10.4. Unauthenticated remote attackers can inject malicious JavaScript arrays by crafting an HTTP Referer header sent to a short URL redirect. This value is saved in the database logs and executed without context-aware escaping when an administrative user views the corresponding statistics visualization page.

Vulnerability Overview

YOURLS (Your Own URL Shortener) incorporates an administrative and analytics dashboard that tracks and aggregates traffic patterns. The tracker extracts user-supplied metrics, specifically the HTTP Referer header, to classify referral sources for individual short URLs. This analysis takes place inside the statistics visualization pipeline.

The core flaw is classified as a Stored Cross-Site Scripting (XSS) vulnerability, mapped to CWE-79. Due to insufficient validation of string boundaries during database storage and subsequent retrieval, characters used to define boundaries in JavaScript arrays (such as single quotes, parentheses, commas, and brackets) are logged without sanitization.

When any user or administrator accesses the statistical summary page (such as http://yourls-domain/<keyword>+), the backend retrieves the log database entries. It passes the domains to an inline Google Charts script generator. The direct interpolation of unsanitized log entries inside raw JavaScript arrays results in unauthenticated client-side code execution.

Root Cause Analysis

The vulnerability lies in the disconnect between the input normalization routine and the visualization template rendering logic. When a client requests a shortened URL, the tracking engine reads the HTTP Referer header via the yourls_get_referrer() handler inside includes/functions.php.

Input is passed to the sanitization function yourls_sanitize_url_safe() inside includes/functions-formatting.php. While this helper intercepts CRLF injections, control characters, and standard HTML structures, it intentionally retains single quotes (') and array brackets ([ / ]), as they are valid within typical HTTP query parameters. The application then writes the parsed referrer directly into the database log table using yourls_log_redirect().

During statistics aggregation inside yourls-infos.php, the domain is parsed via yourls_get_domain() using PHP's native parse_url() function. A crafted payload that mirrors the structure of a valid URL path will allow its malicious host string to pass through. This aggregated domain list is eventually mapped directly inside yourls_google_array_to_data_table(), which outputs raw string literals inside inline JavaScript blocks to build the visualization interface.

Code Analysis & Fix Comparison

The vulnerable manual array compilation logic inside the analytics script generation library includes/functions-infos.php fails to escape variables before outputting them to the template script:

// Vulnerable Implementation (Pre-1.10.4)
function yourls_google_array_to_data_table($data){
    $str  = "var data = google.visualization.arrayToDataTable([\n";
    foreach( $data as $label => $values ){
        if( !is_array( $values ) ) {
            $values = array( $values );
        }
        $str .= "\t['$label',"; // <-- UNSAFE: Unescaped Label
        foreach( $values as $value ){
            if( !is_numeric( $value ) && strpos( $value, '[' ) !== 0 && strpos( $value, '{' ) !== 0 ) {
                $value = "'$value'";
            }
            $str .= "$value";
        }
        $str .= "],\n";
    }
    $str .= "]);";
    return $str;
}

The upstream patch committed in e1e93476655107e6caab34e52259eb1c91079ec7 fixes this issue by securing the rendering function and enforcing strict host validation during parsing. Inside yourls_google_array_to_data_table(), context-aware escaping is applied to both key and value outputs:

// Patched Implementation (1.10.4)
function yourls_google_array_to_data_table(array $data): string {
    $str  = "var data = google.visualization.arrayToDataTable([\n";
    foreach( $data as $label => $values ){
        if( !is_array( $values ) ) {
            $values = array( $values );
        }
        $str .= "\t['" . yourls_esc_js($label) . "',"; // <-- PATCH: Escaped Label
        foreach( $values as $value ){
            $value = yourls_esc_url( $value );
            if( !is_numeric( $value ) && !str_starts_with($value, '[') && !str_starts_with($value, '{')) {
                $value = "'" . yourls_esc_js($value) . "'"; // <-- PATCH: Escaped Value
            }
            $str .= "$value";
        }
        $str .= "],\n";
    }
    $str .= "]);";
    return $str;
}

Additionally, the domain parsing utility yourls_get_domain() has been updated to enforce regex checks on hostname characters. If an illegal character like a single quote is encountered, the domain is discarded, preventing injection into the database logs altogether.

Exploit Mechanics & Vector Analysis

To successfully exploit this, an unauthenticated attacker triggers a redirect request on the target YOURLS instance while supplying a crafted Referer header.

The payload URL is designed to break out of the JavaScript literal context once embedded into the chart array. An example structure is http://x',1],['marker',alert(1)],['z.tld/path. When processed by the PHP XML/URL parser, the domain parser isolates x',1],['marker',alert(1)],['z.tld as the hostname.

curl -H "Referer: http://x',1],['marker',alert(1)],['z.tld/path" http://localhost/<short-code>

Once an administrator loads the stats panel for the target short-code, the payload renders inside the client browser as:

<script type="text/javascript">
var data = google.visualization.arrayToDataTable([
    ['x',1],['marker',alert(1)],['z.tld',1]
]);
</script>

The browser reads the first element ['x', 1], skips to the newly injected element array containing ['marker', alert(1)], and executes the malicious payload inside the user's active context.

Impact Assessment

The execution of malicious JavaScript within the administrative origin of YOURLS has significant consequences. Since the dashboard offers full utility options, an attacker who hijacks an administrator session can execute background requests to manipulate existing redirection configurations.

Because the administrative panel includes AJAX actions to add, modify, or delete links, an attacker can modify redirects to point to phishing pages. In addition, an attacker can query /admin/tools.php silently in the background, extract the administrator's static API signature token, and exfiltrate it. This allows permanent, passwordless access to the YOURLS API endpoint from any location.

The CVSS v3.1 metrics define the base score as 8.2 (High). The vulnerability features low complexity, does not require administrative privileges to inject, and changes the security scope from the server context to the admin's local client domain, resulting in high integrity impacts.

Remediation & Defensive Configuration

Administrators must upgrade their installations to version 1.10.4 or later immediately to completely address both the storage input validation and rendering output layers.

If immediate upgrading is impossible, administrators should restrict the visibility of the statistics panel. Defining YOURLS_PRIVATE_INFOS as true in user/config.php prevents unauthenticated viewers from triggering the vulnerability, though authenticated administrators remain vulnerable.

Deploying a Web Application Firewall (WAF) rule to block incoming request headers that contain single quotes alongside array brackets can stop injection attempts before they are logged to the database.

Official Patches

YOURLSOfficial patch implementing strict character constraints on parsed hosts and output escaping for generated JavaScript data tables.
YOURLSYOURLS 1.10.4 official release package.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N

Affected Systems

YOURLS (Your Own URL Shortener)

Affected Versions Detail

Product
Affected Versions
Fixed Version
YOURLS
YOURLS
>= 1.5.1, < 1.10.41.10.4
AttributeDetail
CWE IDCWE-79 (Improper Neutralization of Input During Web Page Generation)
Attack VectorNetwork (Unauthenticated HTTP Request)
CVSS v3.1 Score8.2 (High)
Exploit StatusProof of Concept (PoC) available and verified
CISA KEV StatusNo
Scope ImpactChanged (Client-side execution on admin origin)

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The application fails to neutralize user-supplied input from the HTTP Referer header before outputting it inside inline JavaScript visualizations, allowing for execution breakouts.

Known Exploits & Detection

GitHub Security AdvisoryVerification harness code targeting YOURLS domain extraction, string sanitization, and inline script generation engines.

Vulnerability Timeline

Testing and initial security validation revisions submitted by team.
2026-05-15
Official fix commit committed to the upstream repository.
2026-05-21
Coordinated disclosure of security advisory GHSA-5h77-88j3-r659 and release of fixed version 1.10.4.
2026-08-21

References & Sources

  • [1]GitHub Security Advisory GHSA-5h77-88j3-r659
  • [2]Vulnerability Fix Commit
  • [3]YOURLS Pull Request 4107
  • [4]CVE-2026-63135 CVE Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•7 minutes ago•CVE-2026-77413
9.3

CVE-2026-77413: Remote Code Execution via Prototype Chain Bypass in JSONata Evaluator

A critical prototype pollution and sandbox escape vulnerability was discovered in the JSONata query and transformation library before versions 1.8.8 and 2.2.0. By providing a malicious JSONata expression that bypasses ownership checks on object properties, remote attackers can execute arbitrary code in the context of the host Node.js application.

Alon Barad
Alon Barad
0 views•6 min read
•about 2 hours ago•CVE-2026-68508
7.8

CVE-2026-68508: Arbitrary Code Execution via Unsafe Dynamic Instantiation in Hydra Core

CVE-2026-68508 is a high-severity arbitrary code execution vulnerability in facebookresearch/hydra (hydra-core) prior to version 1.3.4. The vulnerability exists within the dynamic instantiation system hydra.utils.instantiate(), which resolves and executes arbitrary Python callables from configuration files. An attacker capable of submitting untrusted configurations can achieve arbitrary code execution in the context of the consuming process.

Alon Barad
Alon Barad
3 views•7 min read
•about 3 hours ago•CVE-2026-77415
9.3

CVE-2026-77415: Sandbox Escape and Arbitrary Code Execution in JSONata Engine

A critical sandbox escape vulnerability in JSONata versions prior to 1.8.8 and 2.2.1 allows unauthenticated remote attackers to execute arbitrary code on the host machine. By submitting crafted JSONata expressions, an attacker can manipulate internal AST structures, bypass object clone helpers, spoof native function flags, and escape the evaluation environment to execute system commands through the Node.js runtime.

Alon Barad
Alon Barad
9 views•6 min read
•about 4 hours ago•CVE-2026-77414
9.3

CVE-2026-77414: Critical Sandbox Escape and Remote Code Execution in JSONata via Prototype Pollution

CVE-2026-77414 (GHSA-2943-5xfg-gq5f) is a critical sandbox escape and remote code execution vulnerability in the JSONata package. When JSONata processes untrusted expressions, it uses a vulnerable environment lookup check that can be shadowed by user-defined variables. Attackers can leverage this to traverse the prototype chain, reach the global Function constructor, and execute arbitrary system commands on the host machine.

Alon Barad
Alon Barad
9 views•7 min read
•about 5 hours ago•GHSA-8HGV-XC77-JMCR
9.0

GHSA-8HGV-XC77-JMCR: Privilege Escalation to Super-Admin via Twig Sandbox Escape and Stored XSS in Grav CMS Assets

An overly permissive default configuration in the Grav CMS Twig sandbox combined with a lack of neutralization of double-quote characters in the Asset rendering engine allows low-privileged page editors to inject malicious JavaScript into administrative contexts. This leads to a stored cross-site scripting (XSS) condition that compromises the sessions of super-administrators, facilitating complete privilege escalation.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 6 hours ago•GHSA-8CFW-PCWH-V63W
8.5

GHSA-8CFW-PCWH-V63W: Authenticated Twig Sandbox Escape and Remote Code Execution in Winter CMS

An authenticated Twig sandbox escape vulnerability in Winter CMS allows users with template-editing privileges to bypass sandbox restrictions and execute arbitrary PHP code. This vulnerability represents a complete bypass of the sandbox protections introduced by the previous patch for CVE-2024-54149.

Amit Schendel
Amit Schendel
3 views•6 min read