Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If validuser is actually a valid user name, this SELECT statement will select the validuser record in the table. The reason the hashed password is never checked is because username='validuser' is true; consequently the items after the OR are not tested. As long as the components after the OR generate a syntactically correct SQL expression, the attacker is granted the access of validuser.

Passwords should be hashed. Unfortunately, many small systems fail to comply; consequently, the password text added in the query string would precisely match what the user enters. An Likewise, an attacker could supply a string for <PASSWORD> such as:

...

CERT C Secure Coding Standard

STR02-C. Sanitize data passed to complex subsystems

CERT C++ Secure Coding Standard

STR02-CPP. Sanitize data passed to complex subsystems

CVE-2008-2370

describes a vulnerability in Apache Tomcat 4.1.0 through 4.1.37, 5.5.0 through 5.5.26, and 6.0.0 through 6.0.16. When a RequestDispatcher is used, Tomcat performs path normalization before removing the query string from the URI, which allows remote attackers to conduct directory traversal attacks and read arbitrary files via a .. (dot dot) in a request parameter.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="94efb351fcb15695-c3b349dc-4ea64d50-9849844b-52d78ba07743cb579184c56e"><ac:plain-text-body><![CDATA[

[ISO/IEC TR 24772:2010

http://www.aitcnet.org/isai/]

"Injection [RST]"

]]></ac:plain-text-body></ac:structured-macro>

MITRE CWE

CWE-116, "Improper Encoding or Escaping of Output"

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7365a6828d9756ea-056e2a46-4f7c40db-a8588a32-c0388152495f8fbe8e9dd841"><ac:plain-text-body><![CDATA[

[[OWASP 2005

AA. Bibliography#OWASP 05]]

 

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="75694392c5c56f7c-71ae34f5-4f024012-aa5ba973-13293146af0e659202e1df2b"><ac:plain-text-body><![CDATA[

[[OWASP 2007

AA. Bibliography#OWASP 07]]

 

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5b8eaa01687a8e77-074677d9-47f4421e-8b09b02c-e06c2a1cda367243b993b2c2"><ac:plain-text-body><![CDATA[

[[OWASP 2008

AA. Bibliography#OWASP 08]]

[Testing for XML Injection (OWASP-DV-008)

https://www.owasp.org/index.php/Testing_for_XML_Injection_%28OWASP-DV-008%29]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="576d41f43a79fd75-8b7614fd-44554ba3-978a964d-bb5865543fe40d2be013497b"><ac:plain-text-body><![CDATA[

[[W3C 2008

AA. Bibliography#W3C 08]]

4.4.3 Included If Validating

]]></ac:plain-text-body></ac:structured-macro>

...