New to CAPEC? Start Here
Home > CAPEC List > CAPEC-79: Using Slashes in Alternate Encoding (Version 3.6)  

CAPEC-79: Using Slashes in Alternate Encoding

Attack Pattern ID: 79
Abstraction: Detailed
Status: Draft
Presentation Filter:
+ Description
This attack targets the encoding of the Slash characters. An attacker would try to exploit common filtering problems related to the use of the slashes characters to gain access to resources on the target host. Directory-driven systems, such as file systems and databases, typically use the slash character to indicate traversal between directories or other container components. For murky historical reasons, PCs (and, as a result, Microsoft OSs) choose to use a backslash, whereas the UNIX world typically makes use of the forward slash. The schizophrenic result is that many MS-based systems are required to understand both forms of the slash. This gives the attacker many opportunities to discover and abuse a number of common filtering problems. The goal of this pattern is to discover server software that only applies filters to one version, but not the other.
+ Likelihood Of Attack


+ Typical Severity


+ Relationships
Section HelpThis table shows the other attack patterns and high level categories that are related to this attack pattern. These relationships are defined as ChildOf and ParentOf, and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as CanFollow, PeerOf, and CanAlsoBe are defined to show similar attack patterns that the user may want to explore.
ChildOfStandard Attack PatternStandard Attack Pattern - A standard level attack pattern in CAPEC is focused on a specific methodology or technique used in an attack. It is often seen as a singular piece of a fully executed attack. A standard attack pattern is meant to provide sufficient details to understand the specific technique and how it attempts to accomplish a desired goal. A standard level attack pattern is a specific type of a more abstract meta level attack pattern.267Leverage Alternate Encoding
Section HelpThis table shows the views that this attack pattern belongs to and top level categories within that view.
+ Execution Flow
  1. The attacker has access to a resource path and required to use slashes as resource delimiter.
  2. The attacker tries variation and combination of the slashes characters in different encoding format.
  3. The attacker found an unfiltered combination which maps to a valid path and accesses unauthorized resources (directories, files, etc.)
+ Prerequisites
The application server accepts paths to locate resources.
The application server does insufficient input data validation on the resource path requested by the user.
The access right to resources are not set properly.
+ Skills Required
[Level: Low]
An attacker can try variation of the slashes characters.
[Level: Medium]
An attacker can use more sophisticated tool or script to scan a website and find a path filtering problem.
+ Indicators
If the first path decoding process has left some invalid or denylisted characters, that may be a sign that the request is malicious.
Traffic filtering with IDS (or proxy) can detect request with suspicious URLs. IDS may use signature based identification to reveal such URL based attacks.
An attacker can use a fuzzer in order to probe for a UTF-8 encoding vulnerability. The fuzzer should generate suspicious network activity.
+ Consequences
Section HelpThis table specifies different individual consequences associated with the attack pattern. The Scope identifies the security property that is violated, while the Impact describes the negative technical impact that arises if an adversary succeeds in their attack. The Likelihood provides information about how likely the specific consequence is expected to be seen relative to the other consequences in the list. For example, there may be high likelihood that a pattern will be used to achieve a certain impact, but a low likelihood that it will be exploited to achieve a different impact.
Read Data
Execute Unauthorized Commands
Access Control
Gain Privileges
+ Mitigations
Any security checks should occur after the data has been decoded and validated as correct data format. Do not repeat decoding process, if bad character are left after decoding process, treat the data as suspicious, and fail the validation process. Refer to the RFCs to safely decode URL.
When client input is required from web-based forms, avoid using the "GET" method to submit data, as the method causes the form data to be appended to the URL and is easily manipulated. Instead, use the "POST method whenever possible.
There are tools to scan HTTP requests to the server for valid URL such as URLScan from Microsoft (
Be aware of the threat of alternative method of data encoding and obfuscation technique such as IP address encoding. (See related guideline section)
Test your path decoding process against malicious input.
In the case of path traversals, use the principle of least privilege when determining access rights to file systems. Do not allow users to access directories/files that they should not access.
Assume all input is malicious. Create an allowlist that defines all valid input to the application based on the requirements specifications. Input that does not match against the allowlist should not be permitted to enter into the system.
+ Example Instances
Attack Example: Slashes in Alternate Encodings

The two following requests are equivalent on most Web servers:

http://target server/some_directory\..\..\..\winnt

is equivalent to

http://target server/some_directory/../../../winnt

Multiple encoding conversion problems can also be leveraged as various slashes are instantiated in URL-encoded, UTF-8, or Unicode. Consider the strings

http://target server/some_directory\..%5C..%5C..\winnt

where %5C is equivalent to the \ character.

+ References
[REF-1] G. Hoglund and G. McGraw. "Exploiting Software: How to Break Code". Addison-Wesley. 2004-02.
[REF-525] Markus Kuhn. "UTF-8 and Unicode FAQ for Unix/Linux". 1999-06-04. <>.
[REF-495] Gunter Ollmann. "URL Encoded Attacks - Attacks using the common web browser". <>.
+ Content History
Submission DateSubmitterOrganization
2014-06-23CAPEC Content TeamThe MITRE Corporation
Modification DateModifierOrganization
2017-01-09CAPEC Content TeamThe MITRE Corporation
Updated Related_Attack_Patterns
2020-07-30CAPEC Content TeamThe MITRE Corporation
Updated Indicators, Mitigations
2021-06-24CAPEC Content TeamThe MITRE Corporation
Updated Related_Weaknesses
More information is available — Please select a different filter.
Page Last Updated or Reviewed: October 21, 2021