cve.bz

CAPEC-245

XSS Using Doubled Characters

Medium severityDetailed pattern

The adversary bypasses input validation by using doubled characters in order to perform a cross-site scripting attack. Some filters fail to recognize dangerous sequences if they are preceded by repeated characters. For example, by doubling the < before a script command, (<<script or %3C%3script using URI encoding) the filters of some web applications may fail to recognize the presence of a script tag. If the targeted server is vulnerable to this type of bypass, the adversary can create a crafted URL or other trap to cause a victim to view a page on the targeted server where the malicious content is executed, as per a normal XSS attack.

On this page

Ask an AI about this attack pattern

Show the promptExplain the attack pattern CAPEC-245: XSS Using Doubled Characters: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/245.html and https://cve.bz/cve/capec/245?via=ask-ai-copy, which lists recent CVEs with the weaknesses it exploits. Cite the sources.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this attack pattern's id and public links.

How the attack unfolds

  1. Explore

    The attacker looks for a way in.

    1. [Survey the application for user-controllable inputs] Using a browser or an automated tool, an adversary follows all public links and actions on a web site. They record all the links, the forms, the resources accessed and all other potential entry-points for the web application.

      3 techniques
      • Use a spidering tool to follow and record all links and analyze the web pages to find entry points. Make special note of any links that include parameters in the URL.
      • Use a proxy tool to record all links visited during a manual traversal of the web application.
      • Use a browser to manually explore the website and analyze how it is constructed. Many browsers' plugins are available to facilitate the analysis or automate the discovery.
  2. Experiment

    They probe what they found.

    1. [Probe identified potential entry points for XSS using double characters] The adversary uses the entry points gathered in the "Explore" phase as a target list and injects various common script payloads modified to use double characters and doubled special characters to determine if an entry point actually represents a vulnerability and to characterize the extent to which the vulnerability can be exploited.

      3 techniques
      • Use a list of XSS probe strings using double characters to inject script in parameters of known URLs. If possible, the probe strings contain a unique identifier.
      • Use a proxy tool to record results of manual input of XSS probes in known URLs.
      • Use a list of doubled HTML special characters to inject into parameters of known URLs and check if they were properly encoded, replaced, or filtered out.
    2. [Craft malicious XSS URL] Once the adversary has determined which parameters are vulnerable to XSS, they will craft a malicious URL containing the XSS exploit. The adversary can have many goals, from stealing session IDs, cookies, credentials, and page content from the victim.

      2 techniques
      • Execute a script using an expression embedded in an HTML attribute, which avoids needing to inject a script tag.
      • Send information gathered from the malicious script to a remote endpoint.
  3. Exploit

    They carry out the attack.

    1. [Get victim to click URL] In order for the attack to be successful, the victim needs to access the malicious URL.

      2 techniques
      • Send a phishing email to the victim containing the malicious URL. This can be hidden in a hyperlink as to not show the full URL, which might draw suspicion.
      • Put the malicious URL on a public forum, where many victims might accidentally click the link.

Prerequisites

  • The targeted web application does not fully normalize input before checking for prohibited syntax. In particular, it must fail to recognize prohibited methods preceded by certain sequences of repeated characters.

Resources required

  • The adversary must trick the victim into following a crafted link to a vulnerable server or view a web post where the dangerous commands are executed.

Mitigations

  • Design: Use libraries and templates that minimize unfiltered input.

  • Implementation: Normalize, filter and sanitize all user supplied fields.

  • Implementation: The victim should configure the browser to minimize active content from untrusted sources.

Weaknesses it exploits

  • CWE-85 Doubled Character XSS Manipulations

Recent CVEs with these weaknesses

  1. 6.4CVE-2024-13721

    The Plethora Plugins Tabs + Accordions plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the anchor parameter in all versions up to, and including, 1.1.8 due to insufficient input sanitization and output escaping. This …

  2. 5.4CVE-2022-41676

    Raiden MAILD Mail Server website mail field has insufficient filtering for user input. A remote attacker with general user privilege can send email using the website with malicious JavaScript in the input field, which triggers XSS (Reflect…

The newest records naming one of them. Each weakness's page lists them all.

Part of

MITRE's words, unchanged: CAPEC-245 at MITRE. CAPEC is Copyright © 2007–2026, The MITRE Corporation, used under the CAPEC terms of use: “The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use Common Attack Pattern Enumeration and Classification (CAPEC™) for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE’s copyright designation and this license in any such copy.” CAPEC and the CAPEC logo are trademarks of The MITRE Corporation. Credits. All attack patterns.