cve.bz

CAPEC-101

Server Side Include (SSI) Injection

High severityHigh likelihoodDetailed pattern

An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.

On this page

Ask an AI about this attack pattern

Show the promptExplain the attack pattern CAPEC-101: Server Side Include (SSI) Injection: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/101.html and https://cve.bz/cve/capec/101?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. [Determine applicability] The adversary determines whether server side includes are enabled on the target web server.

      2 techniques
      • Look for popular page file names. The attacker will look for .shtml, .shtm, .asp, .aspx, and other well-known strings in URLs to help determine whether SSI functionality is enabled.
      • Fetch .htaccess file. In Apache web server installations, the .htaccess file may enable server side includes in specific locations. In those cases, the .htaccess file lives inside the directory where SSI is enabled, and is theoretically fetchable from the web server. Although most web servers deny fetching the .htaccess file, a misconfigured server will allow it. Thus, an attacker will frequently try it.
  2. Experiment

    They probe what they found.

    1. [Find Injection Point] Look for user controllable input, including HTTP headers, that can carry server side include directives to the web server.

      2 techniques
      • Use a spidering tool to follow and record all links. 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. Make special note of any links that include parameters in the URL. Manual traversal of this type is frequently necessary to identify forms that are GET method forms rather than POST forms.
  3. Exploit

    They carry out the attack.

    1. [Inject SSI] Using the found injection point, the adversary sends arbitrary code to be inlcuded by the application on the server side. They may then need to view a particular page in order to have the server execute the include directive and run a command or open a file on behalf of the adversary.

Prerequisites

  • A web server that supports server side includes and has them enabled

  • User controllable input that can carry include directives to the web server

Skills required

  • Medium skill

    The attacker needs to be aware of SSI technology, determine the nature of injection and be able to craft input that results in the SSI directives being executed.

Resources required

  • None: No specialized resources are required to execute this type of attack. Determining whether the server supports SSI does not require special tools, and nor does injecting directives that get executed. Spidering tools can make the task of finding and following links easier.

Consequences

What a successful attack can lead to
ImpactAffectsNote
Read DataConfidentiality
Execute Unauthorized CommandsConfidentiality, Integrity, AvailabilityRun Arbitrary Code

Mitigations

  • Set the OPTIONS IncludesNOEXEC in the global access.conf file or local .htaccess (Apache) file to deny SSI execution in directories that do not need them

  • All user controllable input must be appropriately sanitized before use in the application. This includes omitting, or encoding, certain characters or strings that have the potential of being interpreted as part of an SSI directive

  • Server Side Includes must be enabled only if there is a strong business reason to do so. Every additional component enabled on the web server increases the attack surface as well as administrative overhead

Weaknesses it exploits

  • CWE-20 Improper Input Validation
  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component
  • CWE-97 Improper Neutralization of Server-Side Includes (SSI) Within a Web Page

Recent CVEs with these weaknesses

  1. 6.9CVE-2026-140128

    A flaw has been found in Baison E3 Omni-Channel Retail Platform up to 2.5.1. Affected is an unknown function of the component KHATTACH Controller. Executing a manipulation of the argument retObjs can lead to sql injection. It is possible t…

  2. 5.5CVE-2026-139984

    A weakness has been identified in walinejs Waline up to 1.43.6. The affected element is an unknown function of the component OAuth Login Callback Handler. Executing a manipulation of the argument Type can lead to improper input validation.…

  3. 5.5CVE-2026-139983

    A vulnerability was identified in walinejs Waline up to 1.43.4. This issue affects some unknown processing. Such manipulation of the argument mail leads to sql injection. The attack can be executed remotely. The exploit is publicly availab…

  4. 5.5CVE-2026-139982

    A vulnerability was found in PerfreeBlog up to 4.0.11. This issue affects the function buildPage of the file MyBatisUtils.java. Performing a manipulation of the argument Field results in sql injection. Remote exploitation of the attack is …

  5. 2.1CVE-2026-139980

    A vulnerability was detected in PerfreeBlog up to 4.0.11. Affected by this issue is the function buildPage of the file MyBatisUtils.java. The manipulation of the argument Field results in sql injection. The attack can be launched remotely.…

  6. 7.7CVE-2026-105843

    A flaw was found in OpenShift Router. The regular expression used to validate the haproxy.router.openshift.io/hsts_header route annotation matches the whitespace character class, which includes newline characters, and the matched value is …

  7. 2.1CVE-2026-139895

    A vulnerability was determined in itsourcecode Stock Management System 1.0. The impacted element is an unknown function of the file fetchOrderData.php. Executing a manipulation of the argument orderId can lead to sql injection. It is possi…

  8. 3.7CVE-2026-140099

    Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.4, pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and otherPrimeInfos fields and inter…

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

Part of
Can lead to

Examples

Consider a website hosted on a server that permits Server Side Includes (SSI), such as Apache with the "Optio…

Consider a website hosted on a server that permits Server Side Includes (SSI), such as Apache with the "Options Includes" directive enabled.

Whenever an error occurs, the HTTP Headers along with the entire request are logged, which can then be displayed on a page that allows review of such errors. A malicious user can inject SSI directives in the HTTP Headers of a request designed to create an error.

When these logs are eventually reviewed, the server parses the SSI directives and executes them.

MITRE's words, unchanged: CAPEC-101 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.