CVE-2025-68859

Syntax Highlighter Compress <= 3.0.83.3 - Reflected Cross-Site Scripting

mediumImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
6.1
CVSS Score
6.1
CVSS Score
medium
Severity
Unpatched
Patched in
N/A
Time to patch

Description

The Syntax Highlighter Compress plugin for WordPress is vulnerable to Reflected Cross-Site Scripting in versions up to, and including, 3.0.83.3 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=3.0.83.3
PublishedJanuary 16, 2026
Last updatedJanuary 19, 2026
Research Plan
Unverified

# Exploitation Research Plan: CVE-2025-68859 (Syntax Highlighter Compress) ## 1. Vulnerability Summary The **Syntax Highlighter Compress** plugin (<= 3.0.83.3) is vulnerable to **Reflected Cross-Site Scripting (XSS)**. The vulnerability exists because the plugin accepts user-supplied input via quer…

Show full research plan

Exploitation Research Plan: CVE-2025-68859 (Syntax Highlighter Compress)

1. Vulnerability Summary

The Syntax Highlighter Compress plugin (<= 3.0.83.3) is vulnerable to Reflected Cross-Site Scripting (XSS). The vulnerability exists because the plugin accepts user-supplied input via query parameters (likely used for choosing themes, languages, or display settings) and echoes it back into the page HTML without sufficient sanitization (e.g., sanitize_text_field) or output escaping (e.g., esc_attr, esc_html). This allows an attacker to craft a malicious URL that, when clicked by a user, executes arbitrary JavaScript in the context of their session.

2. Attack Vector Analysis

  • Endpoint: Any frontend page or the admin dashboard (depending on where the parameter is reflected).
  • HTTP Method: GET
  • Vulnerable Parameters (Inferred): shc_theme, shc_language, shc_tab_size, or msg.
  • Authentication: None required for the attacker to craft the link. The script executes when any user (including administrators) clicks the link.
  • Preconditions: The plugin must be active.

3. Code Flow (Inferred)

  1. Entry Point: The plugin registers a hook that runs during page generation, most likely wp_head, wp_footer, or admin_notices.
  2. Input: The code accesses a global variable like $_GET['shc_theme'] or $_REQUEST['shc_language'].
  3. Processing: The plugin may use this value to construct a string (e.g., a path to a CSS file or a JavaScript configuration object).
  4. Sink: The plugin uses echo or printf to output the constructed string into the HTML document.
    • Example Path: wp_head -> SyntaxHighlighterCompress::add_css_to_head() -> echo $_GET['shc_theme'];

4. Nonce Acquisition Strategy

Reflected XSS via GET parameters typically does not require a nonce, as the vulnerability exists in the immediate rendering of the request parameters rather than in a state-changing action.

If the reflection occurs within an AJAX handler or a specific admin page that validates nonces before rendering:

  1. Shortcode: Identify the plugin's shortcode (e.g., [shc]).
  2. Page Creation: wp post create --post_type=page --post_status=publish --post_content='[shc]'
  3. Extraction:
    • Navigate to the page.
    • Use browser_eval to find localized variables: browser_eval("window.shc_data?.nonce") or similar keys found by inspecting wp_localize_script in the source.

Note: For this specific Reflected XSS, a nonce is highly unlikely to be required.

5. Exploitation Strategy

Step 1: Identify the Vulnerable Parameter

Search for unescaped echo statements involving $_GET or $_REQUEST:

grep -rP "echo.*\$_(GET|REQUEST)" /var/www/html/wp-content/plugins/syntax-highlighter-compress/

Step 2: Formulate the Payload

Assuming the parameter shc_theme is reflected inside a <link> tag or a script block:

  • Attribute Breakout: default"><script>alert(document.domain)</script>
  • JS String Breakout: ';alert(document.domain);//

Step 3: Execute the Exploit

Use the http_request tool to send the GET request:

{
  "method": "GET",
  "url": "http://localhost:8080/?shc_theme=default%22%3E%3Cscript%3Ealert(document.domain)%3C/script%3E",
  "headers": {
    "Accept": "text/html"
  }
}

6. Test Data Setup

  1. Install/Activate: Ensure version 3.0.83.3 or lower is installed.
  2. Plugin Config: Default settings are usually sufficient.
  3. Admin User: Have an admin session available if the reflection is limited to the admin area.

7. Expected Results

  • The HTTP response body must contain the literal string: default"><script>alert(document.domain)</script>.
  • If viewed in a browser, a JavaScript alert showing the domain should trigger.

8. Verification Steps

  1. Manual Inspection:
    # Check the source code for the exact vulnerable line
    grep -n "shc_theme" /var/www/html/wp-content/plugins/syntax-highlighter-compress/syntax-highlighter-compress.php
    
  2. Response Validation: Use http_request and verify that the payload is not escaped (e.g., look for <script> and not &lt;script&gt;).

9. Alternative Approaches

  • Different Hooks: If not in wp_head, check if the plugin reflects input in the admin_init hook (common for "settings saved" messages).
  • Other Parameters: If shc_theme is sanitized, test shc_language or shc_tab_size.
  • DOM XSS: Check if the plugin's JavaScript reads from location.search and uses .innerHTML or .append() without sanitization. In this case, search .js files for location.search.
Research Findings
Static analysis — not yet PoC-verified

Summary

The Syntax Highlighter Compress plugin for WordPress (<= 3.0.83.3) is vulnerable to Reflected Cross-Site Scripting due to improper sanitization and escaping of user-supplied query parameters. Attackers can exploit this by crafting malicious URLs that execute arbitrary JavaScript in a user's browser when clicked.

Exploit Outline

1. Identify a query parameter that the plugin reflects directly into the HTML source without sanitization (common candidates include 'shc_theme', 'shc_language', or 'shc_tab_size'). 2. Construct a payload that breaks out of the intended HTML context (e.g., using '">' to close an attribute and tag) and appends a script block: 'default"><script>alert(document.domain)</script>'. 3. Encode the payload into a URL targeting a page where the plugin is active (e.g., 'http://victim-site.com/?shc_theme=default%22%3E%3Cscript%3Ealert(1)%3C/script%3E'). 4. Induce a target user to click the link; the reflected script will execute in the context of their session.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.